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 migration guide for Material 3 #10076

Merged
merged 5 commits into from Jan 29, 2024
Merged

Conversation

TahaTesser
Copy link
Member

@TahaTesser TahaTesser commented Jan 23, 2024

Comment on lines 23 to 25
`useMaterial3` to `false`. However, this is just a temporary solution. The
`useMaterial3` flag _and_ the Material 2 implementation will eventually be
removed as part of Flutter’s deprecation policy.
Copy link
Member Author

Choose a reason for hiding this comment

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

@HansMuller
This was written before your comment. Is this still accurate?

If you have any suggestions on updating this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not Hans, but my understanding is that this is still true.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is still true. Before we deprecate M2 we'll provide a theme, in a separate public package, that closely approximates the M2 defaults.

@flutter-website-bot
Copy link
Collaborator

flutter-website-bot commented Jan 23, 2024

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

https://flutter-docs-prod--pr10076-m3-migration-guide-m69kcbls.web.app

@TahaTesser
Copy link
Member Author

TahaTesser commented Jan 23, 2024

@parlough
I just used the resources folder as a placeholder. Do you've any ideas on where to place this guide on the website? Not sure if this belongs to breaking-changes folder.

@parlough
Copy link
Member

parlough commented Jan 23, 2024

Thanks so much for working on this @TahaTesser! This will be an extremely useful reference for developers completing the migration. I'm excited to read it too :D

Do you've any ideas on where to place this guide on the website? Not sure if this belongs to breaking-changes folder.

Good question! Despite the name, breaking-changes is probably the best place for this. It's for any sort of migration guide or change that users should know about, but isn't super necessary after they've completed that migration.

However, we can link to it from elsewhere as well to increase discoverability. I'd likely link to it from the Material Design for Flutter page where it discusses the transition, the Flutter 3.16 section of Breaking changes and migration guides, perhaps in the sidenav directly under "Material design", and wherever else you think would be helpful. Shams might have some opinions as well :)

I'd also consider adding a short redirect link in the firebase.json file so it's easier to share outside the site, maybe something simple like /material-3-migration?

@parlough parlough added review.copy Awaiting Copy Review review.tech Awaiting Technical Review labels Jan 23, 2024
@sfshaza2
Copy link
Contributor

Yes, I want this added to breaking changes and linked to from the Material page. I've already reviewed it as a Google Doc, but will review it as a PR, too. :D

Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

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

This is a great PR, @TahaTesser! I do have some fairly minor grammatical edits. Also:

src/resources/migrating-to-material-3.md Outdated Show resolved Hide resolved
src/resources/migrating-to-material-3.md Outdated Show resolved Hide resolved
src/resources/migrating-to-material-3.md Outdated Show resolved Hide resolved
src/resources/migrating-to-material-3.md Outdated Show resolved Hide resolved
src/resources/migrating-to-material-3.md Outdated Show resolved Hide resolved
src/resources/migrating-to-material-3.md Outdated Show resolved Hide resolved
src/resources/migrating-to-material-3.md Outdated Show resolved Hide resolved
Comment on lines 23 to 25
`useMaterial3` to `false`. However, this is just a temporary solution. The
`useMaterial3` flag _and_ the Material 2 implementation will eventually be
removed as part of Flutter’s deprecation policy.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not Hans, but my understanding is that this is still true.

src/resources/migrating-to-material-3.md Outdated Show resolved Hide resolved
src/resources/migrating-to-material-3.md Outdated Show resolved Hide resolved
@atsansone atsansone added review.await-update Awaiting Updates after Edits and removed review.copy Awaiting Copy Review review.tech Awaiting Technical Review labels Jan 23, 2024
@TahaTesser TahaTesser force-pushed the m3-migration-guide branch 2 times, most recently from f17ad08 to d8588f0 Compare January 24, 2024 13:09
@TahaTesser
Copy link
Member Author

@parlough
Address the feedback. For some reason there is a build failure for check links and staging actions

@sfshaza2
Copy link
Contributor

sfshaza2 commented Jan 24, 2024

/gcbrun

@sfshaza2
Copy link
Contributor

I'm trying the build again, as the log error is weird

Copy link
Member

@parlough parlough left a comment

Choose a reason for hiding this comment

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

Thanks @TahaTesser! A few comments with the fix for the build failure and some suggestions to consider:

firebase.json Outdated Show resolved Hide resolved
src/_data/sidenav.yml Outdated Show resolved Hide resolved
src/release/breaking-changes/material-3-migration.md Outdated Show resolved Hide resolved
src/release/breaking-changes/material-3-migration.md Outdated Show resolved Hide resolved
src/release/breaking-changes/material-3-migration.md Outdated Show resolved Hide resolved
src/release/breaking-changes/index.md Outdated Show resolved Hide resolved
@TahaTesser
Copy link
Member Author

Thanks @TahaTesser! A few comments with the fix for the build failure and some suggestions to consider:

Thanks for the suggestions!

Copy link
Member

@parlough parlough left a comment

Choose a reason for hiding this comment

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

Thanks for making those adjustments @TahaTesser!

I just did a quick scan as it sounds like others reviewed the content, but looks good to me overall. Do wait for a final approval from @sfshaza2 though :)

src/_data/catalog/index.json Outdated Show resolved Hide resolved
src/release/breaking-changes/material-3-migration.md Outdated Show resolved Hide resolved
src/release/breaking-changes/material-3-migration.md Outdated Show resolved Hide resolved
src/release/breaking-changes/material-3-migration.md Outdated Show resolved Hide resolved
src/release/breaking-changes/material-3-migration.md Outdated Show resolved Hide resolved
src/release/breaking-changes/material-3-migration.md Outdated Show resolved Hide resolved
@parlough parlough added the review.copy Awaiting Copy Review label Jan 25, 2024
Copy link
Contributor

@domesticmouse domesticmouse left a comment

Choose a reason for hiding this comment

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

Please wait for @sfshaza2's LGTM

setting the `useMaterial3` flag to true. As of the Flutter 3.16 release
(November 2023), `useMaterial3` is true by default.

By the way, you _can_ recapture Material 2 behavior in your app by setting the
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: suggest "revert to Material 2" to make this more easily understood by ESL developers.

`ColorScheme.surfaceTint` indicates an elevated widget.
Some widgets use different colors.

To return your app’s UI to its previous behavior (which we don't particularly
Copy link
Contributor

Choose a reason for hiding this comment

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

Drop the 'particularly' as overly complex.

indicate elevation (for example, `Card` and `ElevatedButton`) and others might
only use `surfaceTint` to indicate elevation (such as `AppBar`).

If you must return to a widget’s previous behavior, set, set `Colors.transparent`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest: 'To return to the widget's previous behavior'

Copy link
Contributor

Choose a reason for hiding this comment

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

The reason I said "must" is that this page spends a lot of time telling folks how to return to previous behavior, but we really don't want to encourage that.

Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

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

lgtm! Thanks for this herculean effort, @TahaTesser!

@sfshaza2 sfshaza2 merged commit cbcf815 into flutter:main Jan 29, 2024
9 checks passed
@TahaTesser TahaTesser deleted the m3-migration-guide branch January 29, 2024 21:40
@TahaTesser
Copy link
Member Author

lgtm! Thanks for this herculean effort, @TahaTesser!

Wouldn't have been possible without you @sfshaza2 & @parlough 💙

atsansone pushed a commit to atsansone/website that referenced this pull request Feb 15, 2024
Fixes [Create a migration guide for Material
3](flutter/flutter#119319)
atsansone pushed a commit to atsansone/website that referenced this pull request Apr 5, 2024
Fixes [Create a migration guide for Material
3](flutter/flutter#119319)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review.await-update Awaiting Updates after Edits review.copy Awaiting Copy Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a migration guide for Material 3
7 participants