RCT-9930: Render the token accessibility grid only for color tokens - #263
Open
mathevs wants to merge 5 commits into
Open
RCT-9930: Render the token accessibility grid only for color tokens#263mathevs wants to merge 5 commits into
mathevs wants to merge 5 commits into
Conversation
The contrast grid variant checked tokenIds[0] alone, on the assumption that a block's tokens are always of a single type. Check every token instead, so a color token in the first position no longer lets tokens of other types through to getFormattedColor().
…grid Checking every token meant a single token of another type suppressed the entire grid. Filter the ids down to color tokens up front and drive the grid from that list, so the colors still render and only the unsupported tokens are left out.
jovanblazek
approved these changes
Aug 19, 2026
The editor filters a color ramp's token picker down to color tokens, so a group of font tokens reads as empty there, but the exporter rendered them anyway through the stack fallback item - the published page showed a ramp where the editor showed nothing. Filter the group's and list's tokens to colors up front when the variant is a stack, and drive the emptiness gate from the filtered list, so a ramp with no color tokens renders nothing at all rather than a bare group header above an empty stack.
Check for "stack" and "stack-2" by name instead of any variant key containing "stack", so the filter matches the two color ramp variants that actually exist and nothing that might later share the substring.
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.
Uh oh!
There was an error while loading. Please reload this page.