Repository navigation
fix(fortal): fade state fills in from a clear of their own colour - #680
Open
chrishiguto wants to merge 6 commits into
Open
chrishiguto wants to merge 6 commits into
chrishiguto wants to merge 6 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Highlight fills flashed a dark gray for one to three frames: menu rows, toggle group items, multi select and select options, outline and ghost buttons, number field steppers and more. Each rest colour was transparent black (
Color(0x00000000)). Colours interpolate without premultiplying alpha, so halfway togray3the fill is a half-transparent mid gray, which reads as RGB 190 over white where the settled fill is 248.Scope
fortalClear(fill)intheme/control_styles.dart: the fill's own colour with alpha 0, one cached token per fill so equal styles stay equal. From it only the alpha changes._transparentfill constants are gone; the toggle keeps one for its ghost border, which no state animates.test/fortal/state_colour_lerp_test.dartsweeps every Fortal recipe in every variant, in light and dark under all eight accents. For rest to hover, press, focus, selected and disabled, the selected rest to its hover and press, and selecting under the pointer, it interpolates each colour the resolved spec carries and checks that, over the page, panel and surface colours, no channel leaves the range of its two ends. It also fails when a family inspecs/fortal_catalog.jsonhas no recipe in the sweep and no stated reason (families that only compose other recipes or paint themselves are listed), so a new recipe cannot be missed.Tradeoffs
Colors.transparentnow assert a colour with no alpha.Blast Radius
fortalClear. Nothing is removed or renamed.theme.Verification
cd registry_source && flutter test, demo and dashboard suites,check_consumer_apps: pass at the stack tip.