Add Material style variant enum (#12221) - #12717
Conversation
Related to https://github.com/orgs/flutter/projects/250 This PR is just to add the `StyleVariant` enum so we can start migrating individual components. ## Pre-Review Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran [the auto-formatter]. - [x] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I followed [the version and CHANGELOG instructions], using [semantic versioning] and the [repository CHANGELOG style], or I have commented below to indicate which documented exception this PR falls under[^1]. - [x] I updated/added any relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or I have commented below to indicate which [test exemption] this PR falls under[^1]. - [x] All existing and new tests are passing.
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
There was a problem hiding this comment.
Code Review
This pull request introduces a new StyleVariant enum to define the Material Design style variant used by Material components, adding options for material3 and material3Expressive. Feedback was provided to adjust the formatting of the documentation's 'See also' section for consistency with Flutter's style guidelines.
| /// See also: | ||
| /// | ||
| /// * the [Material Design 3 Expressive updates](https://m3.material.io/#9f2db05b-ebbb-47c2-892d-1cca35afa386) for design guidelines. |
There was a problem hiding this comment.
For consistency with the rest of the file and Flutter's documentation style, the bullet point in the "See also" section should have two spaces of indentation before the asterisk, and the link text should be capitalized directly without the leading lowercase "the".
/// See also:
///
/// * [Material Design 3 Expressive updates](https://m3.material.io/#9f2db05b-ebbb-47c2-892d-1cca35afa386) for design guidelines.
QuncCccccc
left a comment
There was a problem hiding this comment.
LGTM! Thanks a lot for helping porting these PRs over and addressing the AI review feedback. Really appreciated!
| @@ -0,0 +1,3 @@ | |||
| changelog: | | |||
| - Adds the `StyleVariant` enum defining the Material 3 and Material 3 Expressive style variants. | |||
| version: skip | |||
There was a problem hiding this comment.
Seems the Linux repo_checks is failed, should we change this to minor because we added a new API or add a no version label?
Work towards flutter/flutter#191088
Ports over #12221 which landed on the
m3e_migrationfeature branch.Original PR description
Related to Bring Material 3 Expressive to Flutter
This PR is just to add the StyleVariant enum so we can start migrating individual components.
Pre-Review Checklist
[shared_preferences]///).Text exemption: Adds an enum, no change behavior.
If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2