refactor: migrate Chip (next) colours to beta tokens - #5225
Conversation
|
@claude review |
|
Claude finished @pomfrida's task in 3m 43s —— View job Review — Chip (next) beta token migrationRead the full Verdict: clean, well-scoped migration. The ✅ Verified
🟡 Questions / nits
Everything else (focus ring retarget to
|
|
Re. review point 1 (text colour on default/outlined moving from The absolute step-12 values differ marginally because the whole beta palette is regenerated, but that applies to every step and is covered by the visual parity check against prod (see PR description). Points 2 ( |
|
Correction to the parity claim above: the visual check against prod turned out to only cover light mode for Chip (dark was compared local-only). I've now completed the dark-mode comparison against prod with computed colours, and it is not full parity: Matches in dark
Deviations in dark
Items 1–3 are token-export issues rather than mapping mistakes — the PR deliberately follows the semantic subtle ladder. Flagged in #5221 for the token/design side. Whether this PR should stay on the semantic ladder (and let the fix land in the tokens) or pin steps per scheme is a design call. |
…th the widened semantic block The widened semantic layer and the color-scheme scope rules both apply to [data-color-scheme] elements at equal specificity, so source order decides the three duplicate names tracked in #5221. With the previous alphabetical order the semantic block sorted last and won - and its --eds-border-focus is a self-reference, computing to the guaranteed-invalid value, which would have dropped focus outlines for the incoming Chip (#5225) and Button (#5222) migrations inside scoped subtrees (both use var(--eds-border-focus) for their focus ring). The bundler now ranks color-scheme/* after every other layer, so the scheme-specific values win on scoped elements and every resolved value matches the pre-widening state. Verified in the browser: --eds-border-focus resolves to the light/dark blue per subtree, and text-disabled/border-disabled keep their scheme values.
Closes #5223. Part of #5119 (phase 1 — colour). Second component onto the Tokens Studio beta tokens, following the Button test case (#5222). Chip has no disabled state, so it migrates completely — no legacy colour references remain.
Stacked on #5224 (Storybook wiring); the base retargets to
mainautomatically when that merges.Changes
chip.cssonly:neutral/accent/success/info/warning/danger— every scale exists in the beta export) via the--_tone-Nstep indirection established in Button;data-color-appearanceselects the scale, root defaults to neutral (Chip's default tone)--eds-text-on-accent(high-contrast text),--eds-border-focusand--eds-background-container-canvas-default(focus ring)--eds-background-surface-accent-subtle-*); high-contrast = 9/10/11Deliberate deviations (design sign-off wanted)
Both align Chip with the semantic subtle rest/hover/pressed trio; visually indistinguishable in the matrix comparison.
Learnings
selectedturns out to have no colour styling in Chip (check icon only), so the semantic selected groups (background-surface-accent-selected-*,border-selected) were not exercised here after all — a later component (or a Chip design update) needs to validate those.Verification
ToneVariantMatrix, all 3 variants × 6 tones): identical in light, consistent in dark