Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Optimistic State" architecture cookbook recipe #11394

Merged
merged 17 commits into from
Nov 21, 2024

Conversation

miquelbeltran
Copy link
Member

@miquelbeltran miquelbeltran commented Nov 13, 2024

Description of what this PR is changing or adding, and why:

This is the first of several PRs that add the app-architecture cookbook recipes.

This one includes the recipe for "Optimistic State".

Some considerations:

cc. @ericwindmill

Issues fixed by this PR (if any):

PRs or commits this PR depends on (if any):

Presubmit checklist

  • This PR is marked as draft with an explanation if not meant to land until a future stable release.
  • This PR doesn’t contain automatically generated corrections (Grammarly or similar).
  • This PR follows the Google Developer Documentation Style Guidelines — for example, it doesn’t use i.e. or e.g., and it avoids I and we (first person).
  • This PR uses semantic line breaks of 80 characters or fewer.

@miquelbeltran miquelbeltran requested review from sfshaza2, parlough and a team as code owners November 13, 2024 16:38
Comment on lines 599 to 600
[Flutter Architecture guidelines]:/app-architecture
[Command pattern]:/app-architecture/cookbook/command
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, these locations are still not available, so the urls will 404 atm

@flutter-website-bot
Copy link
Collaborator

flutter-website-bot commented Nov 13, 2024

Visit the preview URL for this PR (updated for commit 4dd3141):

https://flutter-docs-prod--pr11394-mb-optimistic-state-r6prt6uc.web.app

@ericwindmill
Copy link
Contributor

ericwindmill commented Nov 13, 2024

@sfshaza2 and @parlough -- I'm curious if you all have different opinions about the general info architecture of the architecture work Miguel and I have done.

I agree with both of these decisions. In a future PR, after #11300 lands, I want to expand and then add the index page for these architecture recipes to the side nav. For context, the recipes that Miguel has written for app architecture refer to the app architecture docs to varying degrees. For that reason, I believe they don't belong on the main Cookbook index page.

@sfshaza2
Copy link
Contributor

@ericwindmill, I'd like @parlough's opinion on this, but I don't want a plethora of cookbooks. I'd like to incorporate these new recipes into a new category of the existing cookbook. When Parker re-implemented the website, he added the ability to add items to the sidenav a) more than once and b) regardless of where the files sit on the website. This is why we surfaced cookbook recipes in other parts of the sidenav, but we still keep them together on disk. I'd like to follow this process for these recipes.

@ericwindmill
Copy link
Contributor

@ericwindmill, I'd like @parlough's opinion on this, but I don't want a plethora of cookbooks. I'd like to incorporate these new recipes into a new category of the existing cookbook. When Parker re-implemented the website, he added the ability to add items to the sidenav a) more than once and b) regardless of where the files sit on the website. This is why we surfaced cookbook recipes in other parts of the sidenav, but we still keep them together on disk. I'd like to follow this process for these recipes.

I am 100% okay with these living in a new subdirectory under cookbook like /content/cookbook/architecture/. As you know, I love organization above all else :) I don't actually want these in the sidenav, because I don't want to over-complicate the sidenav of the site in general, regardless of this PR. What I actually want in the side nav is just a page under 'App Architecture' that introduces and links to the architecture recipes that Miguel has written. (There are 6 or 7 total, btw).

@miquelbeltran can you make the following changes:

  • move the recipes to the main cookbook in a new subdir
  • move the index file you created up a level to /app-architecture and rename it 'Design Patterns'
  • add the Design Patterns page to the side nav under the 'Recommendations' page?

In the near future when more cookbooks have landed, I want to update the design patterns page to be visually interesting, with images or a table or something. I'll document that work in the umbrella ticket.

@miquelbeltran
Copy link
Member Author

On it! I will move this and the ones in #11410 to the /content/cookbook/architecture/ folder, I will also move the examples into /examples/cookbook/architecture/

@miquelbeltran
Copy link
Member Author

image

@miquelbeltran
Copy link
Member Author

I will have to remove the "Command pattern" link otherwise the site check fails, I will add this link once I create the PR for the Command.

@ericwindmill
Copy link
Contributor

After CI passes, I'm going to merge this. Speak now if you disagree!

@ericwindmill ericwindmill merged commit 29a7d3a into main Nov 21, 2024
9 checks passed
@ericwindmill ericwindmill deleted the mb-optimistic-state branch November 21, 2024 18:32
ericwindmill pushed a commit that referenced this pull request Nov 21, 2024
_Description of what this PR is changing or adding, and why:_

This PR follows the same pattern as
#11394.

Adds the architecture cookbook recipes for storing key-value data and
storing complex data with SQL.

The two cookbook recipes are submitted together because they share the
"todo app" example under `examples/app-architecture/todo_app_service`.

cc. @ericwindmill 

_Issues fixed by this PR (if any):_

- Part of #11374

## Presubmit checklist

- [ ] This PR is marked as draft with an explanation if not meant to
land until a future stable release.
- [x] This PR doesn’t contain automatically generated corrections
(Grammarly or similar).
- [x] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [x] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.

---------

Co-authored-by: Shams Zakhour (ignore Sfshaza) <[email protected]>
sfshaza2 added a commit that referenced this pull request Nov 22, 2024
_Description of what this PR is changing or adding, and why:_

Following PRs #11410 and #11394 this PR adds the "Offline-first"
cookbook recipe for the Architecture design patterns.

_Issues fixed by this PR (if any):_

Part of #11374

_PRs or commits this PR depends on (if any):_

## Presubmit checklist

- [ ] This PR is marked as draft with an explanation if not meant to
land until a future stable release.
- [x] This PR doesn’t contain automatically generated corrections
(Grammarly or similar).
- [x] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [x] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.

---------

Co-authored-by: Shams Zakhour (ignore Sfshaza) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants