-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Manually roll material_color_utilities #170000
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
base: master
Are you sure you want to change the base?
Conversation
autosubmit label was removed for flutter/flutter/170000, because - The status or check suite Windows framework_tests_libraries has failed. Please fix the issues identified (or deflake) before re-applying this label. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to be rolled up in a guide on the website for users that won't want these colors to change out from under them. See similar doc on the website linked below.
Also cc @QuncCccccc
I almost want to make a branch on material at the last merge and apply the fixes so we don't have to throw the baby out with the bath water. Will ponder... |
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
@Piinks – so, this is interesting. I've updated the description of this PR. The changes made in August seem to have been only half of the changes to make things consistent. This is the other half of the changes that align with the Aug 2024 update. https://m3.material.io/styles/color/system/overview#785757d4-691b-45dd-b5dc-9d53ec6fbdbf Specifically these changes: material-foundation/material-color-utilities@03336bf#diff-f0d491177f9e42cf45baea3a37a1694c493d60d17855101af426848634d410eb |
FYI: this change does drop the code size of the material sample (minified, uncompressed JS) around ~2k. The changes eliminated several dynamic calls and make things final which allows more more optimization in the compiler |
Ok! All that needs doing IMO is creating a one pager on the website to help folks maintain the colors they have when this reaches stable and breaks them. I shared an example above. |
@Piinks happy to help, BUT I'm a bit confused how to do it. See the linked diff from the repo. It's not a matter of switching color A for color B. The algorithm used to calculate colors changed. If I understand correctly, the color roll we did in the fall left us out of sync w/ the algorithm change being brought in here. |
This aligns the docs with the changes in flutter/flutter#170000
@Piinks – FYI/interesting - no goldens are affected here? Hrm... |
This updates Flutter to the latest release, which includes a bunch of code cleanup that should improve compiled code size and (hopefully) runtime performance.
The changes in #153385 (discussed in https://docs.flutter.dev/release/breaking-changes/material-design-3-token-update) seem to have been incomplete.
This PR effectively catches up with these changes by updating the "math" behind primary, secondary, tertiary, error colors.
There is a pending PR on the site to update the corresponding docs: flutter/website#12125