Repository navigation
fix(theme): 104 raw blue-ramp theme ternaries become semantic tokens — accentRamp 515 → 331 (#1028) - #1068
Merged
Conversation
…1028) Two patterns made up most of the raw colors.blue[...] uses: a link/icon accent written as `dark ? blue[300] : blue[600|700]` and a tinted ground written as `dark ? blue[900] : blue[50|100]`. Both are now the theme's tokens, indexed by the same condition so behaviour in each theme is unchanged in kind: colors.text[t].emphasis and colors.bg[t].selected (teal, the product accent, instead of an off-palette blue). Where the condition was `t === 'dark'` and t is already the theme key, the index is just [t]; tsc confirms t is 'light' | 'dark' at every such site. The background-check status 'info' tone uses the info tokens instead; an info state is not the accent. accentRamp ratchet 515 -> 331. The rest are single-shade or mixed uses that need a look each, not a codemod. Refs #1028 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Refs #1028 (first pass; the issue stays open). The accentRamp ratchet goes from 515 to 331.
What changed
Two theme ternaries account for most of the raw
colors.blue[…]uses. Both now map to the theme's own tokens, indexed by the same condition, so each theme still gets its own colour:dark ? blue[300] : blue[600 or 700]colors.text[t].emphasisdark ? blue[900] : blue[50 or 100]colors.bg[t].selectedThat's 104 replacements in 44 files, all made by a codemod that matches only those exact two-sided shapes. The visible effect is that these accents become the product's teal instead of an off-palette blue.
t === 'dark'andtis already the theme key, the index is simply[t]. tsc passes, sotis'light' | 'dark'at all 88 such sites.'info'tone now uses theinfotokens (fg/border[t].info), because an info state is not the accent.blue[700]/blue[300]border or a one-offblue[500]. Each needs a look rather than a codemod.Reviewing: pre-commit's formatter reflowed the touched files, so the line diff is noisy.
git diff --word-diffor GitHub's "hide whitespace" shows the real change.Captures
I swept
/office/api-keys,/office/ats,/office/developer,/profile,/dashboard,/communities,/assessmentsand/jobsin light and dark at 1440 and 390: 196 captures. Every page was ready, matched its theme, and had no page errors.The one clip, "Export CSV" on
/communities/connectionsat 390, is in a file this PR doesn't touch. It already happens on main and gets its own PR.Checks
tscpasses on scf-core and the app.pnpm prepushpasses, with 176/176 gated API tests.🤖 Generated with Claude Code