Skip to content

Improve color display in M3 Demo #2438

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

Merged
merged 10 commits into from
Sep 23, 2024
Merged

Improve color display in M3 Demo #2438

merged 10 commits into from
Sep 23, 2024

Conversation

jwill
Copy link
Contributor

@jwill jwill commented Sep 12, 2024

  • Added the color scheme schematic from Material Theme Builder aligning how colors are displayed here and in documentation across Android and Figma.
  • On desktop, individual colors can be copied to the clipboard
  • View adapts from the existing single column view to the new schematic at 500dp width.

Before:

Screenshot 2024-09-12 at 2 40 15 PM

After:

mobile

Screenshot_20240912_144150

Pre-launch Checklist

  • I read the Flutter Style Guide recently, and have followed its advice.
  • I signed the CLA.
  • I read the Contributors Guide.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-devrel channel on Discord.

Change threshold to show wider schematic on wide screens.
SchemePreview displays colors in a similar fashion to MTB and Design Kit aligning with other design materials.
fix failing lint tests
remove deprecated usages
@jwill jwill requested a review from ericwindmill September 18, 2024 04:38
@domesticmouse
Copy link
Contributor

Please dart format this PR

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.

dart format required by CI

@jwill jwill requested a review from domesticmouse September 18, 2024 14:40
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.

LGTM. Please take a look @QuncCccccc

@domesticmouse
Copy link
Contributor

@Piinks is there somewhere I can advocate for deprecation of a feature and the addition of its replacement to be in staggered releases?

@@ -47,7 +47,8 @@ declare -ar PROJECT_NAMES=(
"infinite_list"
"ios_app_clip"
"isolate_example"
"material_3_demo"
# TODO @ewindmill -- Color.red is deprecated and should be Color.r (same for green and blue)
# "material_3_demo"
Copy link
Contributor

Choose a reason for hiding this comment

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

@jwill FYI, this is how to turn CI off for a specific sample in a specific environment.
We do this when an API is being deprecated in an upcoming version, and theres no way to make CI for Stable and beta channels happy at the same time. Ahead of every release, I update the sample code to reflect what will be in the new stable, and then add all the samples back to CI for the beta and master flutter channels.

Copy link
Contributor

@QuncCccccc QuncCccccc 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 a lot for improving the color layouts! For ColorScheme, we also support primaryFixed, primaryFixedDim, onPrimaryFixed, onPrimaryVarient and similar color roles for secondary, and tertiary groups, do we also want to show them like here? I don't think any widgets are using them though, so either way is fine to me.

Removed commented code.
@jwill jwill merged commit a7df23f into flutter:main Sep 23, 2024
13 checks passed
@jwill jwill deleted the jwill_m3_demo branch September 23, 2024 18:44
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