Repository navigation
refactor: rename design tokens to match new naming convention - #894
Conversation
|
@ernestt The What should these map to? A few options:
Let me know and I can update this PR. |
| '--color-accent': 'light-dark(#0064E0, #2694FE)', | ||
| '--color-accent-muted': 'light-dark(#0082FB33, #0082FB3F)', | ||
| '--color-secondary': | ||
| '--color-on-accent': 'light-dark(#000000, #000000)', |
There was a problem hiding this comment.
These should both be white, right?
| '--color-icon-secondary': 'light-dark(#4E606F, #AAAFB5)', | ||
| '--color-icon-disabled': 'light-dark(#A4B0BC, #6F747C)', | ||
| '--color-icon-on-dark-media': 'light-dark(#FFFFFF, #FFFFFF)', | ||
| '--color-icon-on-dark': 'light-dark(#FFFFFF, #FFFFFF)', |
There was a problem hiding this comment.
I think we removed this in favor of --color-on-dark
There was a problem hiding this comment.
It seems like navi missed this
| // Status/Sentiment | ||
| '--color-success': 'light-dark(#0D8626, #0D8626)', | ||
| '--color-success-muted': 'light-dark(#0B991F33, #0B991F3F)', | ||
| '--color-on-success': 'light-dark(#000000, #000000)', |
| '--color-on-success': 'light-dark(#000000, #000000)', | ||
| '--color-error': 'light-dark(#E3193B, #F5394F)', | ||
| '--color-error-muted': 'light-dark(#E3193B33, #F5394F3F)', | ||
| '--color-on-error': 'light-dark(#000000, #000000)', |
cixzhang
left a comment
There was a problem hiding this comment.
For codemods, we need to add a new one for v0.0.8 to migrate the v0.0.6 names to this new version. It's probably okay for the v0.0.6 codemods to be update as well, but we will need to migrate anyone on 0.0.7 now.
| '--color-info': 'light-dark(#5B08D8, #6B1EFD)', | ||
| '--color-info-muted': 'light-dark(#7952FF33, #5B08D83F)', |
There was a problem hiding this comment.
I think we deleted these.
Renames all design tokens based on the token spec spreadsheet.
Token renames (134 files, ~1400 lines changed):
- Color palette: --color-{color}-{type} → --color-{type}-{color}
- Backgrounds: --color-wash/surface/card/popover/muted → --color-background-*
- Text: --color-text-link → --color-text-accent
- Media: --color-text-on-dark-media → --color-on-dark
- Effects: --color-hover-tint → --color-tint-hover
- Status: --color-secondary → --color-neutral
- Size: --size-sm/md/lg → --size-element-sm/md/lg
- Radius: numeric (--radius-0..4) → semantic (--radius-none/inner/element/container/full)
- Shadow: --shadow-base/menu/hover/dialog → --shadow-low/med/high
- Shadow inset: --inset-shadow-border-* → --shadow-inset-*
- Font family: --font-body/code/heading → --font-family-body/code/heading
- Font size: --text-* → --font-size-*
- Type scale: --heading-*-size/weight/leading → --text-heading-*-size/weight/leading
Token removals:
- --color-ring-focus → replaced with --color-accent
- --color-ring-focus-error/success/warning → replaced with --color-error/success/warning
- --color-border-strong → replaced with --color-border-emphasized
- --radius-4 → replaced with --radius-container
- --shadow-base → replaced with --shadow-low
NOT included in this PR (needs discussion):
- --leading-* line height tokens (spreadsheet says remove, but heavily used in ~69 files)
- New tokens: --color-on-accent/success/error/warning, --color-on-light, --color-icon-accent, --border-width
Adds new --border-width token (default: 1px) to borderDefaults/borderVars. Replaces all hardcoded 1px border widths across 16 component files with borderVars['--border-width'] for theme-ability. Affected components: Card, CheckboxInput, DateInput, Field, List, RadioList, Selector, SideNav, TabList, Table, TimeInput, TopNav, CodeBlock, CodeEditor.
…arning, on-light, icon-accent) New tokens per spreadsheet: - --color-on-accent: #000000 / #000000 - --color-on-success: #000000 / #000000 - --color-on-error: #000000 / #000000 - --color-on-warning: #0A1317 / #0A1317 - --color-on-light: #000000 / #000000 - --color-icon-accent: #0064E0 / #2694FE
- Fix expandRadiusScale: remove duplicate --radius-container (from old --radius-4) - Fix expandTypeScale: generate --text-heading-N-* instead of --heading-N-* - Fix defineTheme: reference --text-heading-N-* in prose CSS generation - Update codemods to target final token names (skip intermediate v0.0.6 names) - Update all test expectations to match new token names
…ternatives Per spreadsheet: remove --color-icon-on-dark and use --color-on-* tokens. Replacements: - CheckboxInput (checkmark + indeterminate mark) → --color-on-accent - NavIcon (icon on accent circle) → --color-on-accent - RadioList (inner dot on accent radio) → --color-on-accent - Spinner (onMedia shade) → --color-on-dark Also: - Restore v0.0.6 codemods to original state (per review feedback) - Add new v0.0.8 codemod for token renames with tests
f8bf07d to
029af2e
Compare
…st assertions - Remove --color-info and --color-info-muted (per Cindy's review) - Fix duplicate token keys in neutral theme (--color-accent, --color-error, --color-success, --color-warning, --color-border-emphasized, --shadow-low) - Fix expandTypeScale test: --heading-N-leading → --text-heading-N-leading - Fix generateThemeRules test: var(--text-) → var(--font-size-)
…count - CodeBlock and CodeEditor had duplicate borderVars in imports - defineTheme test filter updated: --heading- → --font-size- | --text-
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsAppShell · View in Storybook
Avatar · View in Storybook
Badge · View in Storybook
Banner · View in Storybook
Breadcrumbs · View in Storybook
Button · View in Storybook
Calendar · View in Storybook
Card · View in Storybook
CheckboxInput · View in Storybook
Collapsible · View in Storybook
DateInput · View in Storybook
Dialog · View in Storybook
Divider · View in Storybook
DropdownMenu · View in Storybook
EmptyState · View in Storybook
Field · View in Storybook
HoverCard · View in Storybook
Kbd · View in Storybook
Link · View in Storybook
List · View in Storybook
MobileNav · View in Storybook
MoreMenu · View in Storybook
NavIcon
NavItem
NumberInput · View in Storybook
Pagination · View in Storybook
Popover · View in Storybook
PowerSearch · View in Storybook
ProgressBar · View in Storybook
RadioList · View in Storybook
Section · View in Storybook
SegmentedControl · View in Storybook
Selector · View in Storybook
SideNav · View in Storybook
Skeleton · View in Storybook
Slider · View in Storybook
Spinner · View in Storybook
StatusDot · View in Storybook
Switch · View in Storybook
TabList · View in Storybook
Table · View in Storybook
TextArea · View in Storybook
TextInput · View in Storybook
TimeInput · View in Storybook
Token · View in Storybook
Tokenizer · View in Storybook
Tooltip · View in Storybook
TopNav · View in Storybook
TreeList · View in Storybook
Typeahead · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 7 accessibility violation(s) found — 2 critical, 3 serious, 2 moderate. XDSBanner - 1 issue(s)
XDSCalendar - 1 issue(s)
XDSList - 1 issue(s)
XDSPagination - 1 issue(s)
XDSSideNav - 1 issue(s)
XDSTabList - 1 issue(s)
XDSToken - 1 issue(s)
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
|
@rubyycheung thats weird that its still using leading tokens. This PR should have removed all its usage to a hard coded line height. #682 But the components should be using semantic tokens, not hardcoded, not raw leading tokens. |
| | --text-code-leading | | | 1.4286 | | | ||
| | --text-supporting-size | var(--font-size-sm) | 12px | | | | ||
| | --text-supporting-weight | | | | normal | | ||
| | --text-supporting-leading | | | 1.6667 | | |
| @@ -223,13 +223,13 @@ Override the entire scale with `typography.scale: { base, ratio }` in `defineThe | |||
|
|
|||
| Intent-based ratios for component use. Not modified by `typography.scale`. | |||
|
|
|||
| | Token | Value | Usage | | |||
| | ----------------- | ------ | ---------------------------- | | |||
| | --leading-tight | 1.25 | Display text, headings | | |||
| | --leading-snug | 1.375 | Compact body text, headings | | |||
| | --leading-base | 1.4286 | Body text with --text-base | | |||
| | --leading-normal | 1.5 | Body text, large body | | |||
| | --leading-relaxed | 1.625 | Editorial body, reading text | | |||
| | Token | Value | Usage | | |||
| | ----------------- | ------ | ------------------------------- | | |||
| | --leading-tight | 1.25 | Display text, headings | | |||
| | --leading-snug | 1.375 | Compact body text, headings | | |||
| | --leading-base | 1.4286 | Body text with --font-size-base | | |||
| | --leading-normal | 1.5 | Body text, large body | | |||
| | --leading-relaxed | 1.625 | Editorial body, reading text | | |||
| h1: {fontSize: 'var(--font-size-2xl)', lineHeight: '1.2'}, | ||
| h2: {fontSize: 'var(--font-size-xl)', lineHeight: '1.333'}, | ||
| h3: {fontSize: 'var(--font-size-lg)', lineHeight: '1.25'}, | ||
| h4: {fontSize: 'var(--font-size-base)', lineHeight: 'var(--leading-base)'}, | ||
| h5: {fontSize: 'var(--font-size-base)', lineHeight: 'var(--leading-base)'}, | ||
| h6: {fontSize: 'var(--font-size-xs)', lineHeight: '1.333'}, |
There was a problem hiding this comment.
These should use the semantic lineHeight vars per type.
|
|
||
| // Text element resets | ||
| parts.push(` p {\n font-family: var(--font-heading);\n color: var(--color-text-primary);\n margin: 0;\n font-size: var(--text-base);\n line-height: var(--leading-base);\n }`); | ||
| parts.push(` p {\n font-family: var(--font-family-heading);\n color: var(--color-text-primary);\n margin: 0;\n font-size: var(--font-size-base);\n line-height: var(--leading-base);\n }`); |
There was a problem hiding this comment.
--leading-base is removed. These should be updated to use the semantic text variables for body text.
| parts.push(` p {\n font-family: var(--font-family-heading);\n color: var(--color-text-primary);\n margin: 0;\n font-size: var(--font-size-base);\n line-height: var(--leading-base);\n }`); | ||
|
|
||
| parts.push(` small {\n font-size: var(--text-xsm);\n line-height: 1.333;\n color: var(--color-text-secondary);\n }`); | ||
| parts.push(` small {\n font-size: var(--font-size-xs);\n line-height: 1.333;\n color: var(--color-text-secondary);\n }`); |
There was a problem hiding this comment.
The font size and line height should be updated to use the semantic text variables for supporting text.
| parts.push(` small {\n font-size: var(--font-size-xs);\n line-height: 1.333;\n color: var(--color-text-secondary);\n }`); | ||
|
|
||
| parts.push(` code, pre {\n font-family: var(--font-code);\n font-size: var(--text-base);\n line-height: var(--leading-base);\n }`); | ||
| parts.push(` code, pre {\n font-family: var(--font-family-code);\n font-size: var(--font-size-base);\n line-height: var(--leading-base);\n }`); |
There was a problem hiding this comment.
the font size and line height should be updated to use the semantic text variables for body text (while keeping the code font family).
cixzhang
left a comment
There was a problem hiding this comment.
A few more comments to clean up docs and other related files.
- Fix stale --color-surface in Section.stories.tsx - Fix --radius-page value 16→28px in create-theme.md - Fix duplicate --radius-container→--radius-page in tokens.md, tokens.doc.mjs - Fix duplicate --shadow-low row in tokens.doc.mjs - Add --radius-page to radius-evaluator.md, theme.md, theme.doc.mjs - Add display tokens (display-1/2/3) to tokens.md type scale docs - Add --border-width token to tokens.md - Add --color-on-accent/success/error/warning/dark/light to tokens.md - Add --color-icon-accent to tokens.md - Mark --leading-* tokens as deprecated with migration table in tokens.md - Update radius description from 'Numeric' to 'Semantic' in tokens.md/doc - Fix theme-editor code example to use --color-on-accent (not on-dark) Co-authored-by: Navi <[email protected]>
Second pass review + fixes (b61d42d)Deep comb through all 142 files. Ruby's fixes from earlier look good (theme-editor cleanup, create-theme radius-page). Pushed additional fixes: Stale token references
Duplicate/wrong entries in docs
Missing documentation
One thing to note
1984 tests pass, build + lint clean. |
--color-info (#5B08D8) is an exact match for --color-icon-purple. --color-info-muted (#7952FF33) matches --color-background-purple. This ensures v0.0.6 consumers with --color-info usage have a clean migration path to v0.0.8. Co-authored-by: Navi <[email protected]>
|
You should remove the leading and add a codemod to migrate them per the table Ernest suggested There's a visual bug in XDSField -- we have gap between the label and description but now with the leading update we should remove that gap. Keep the gap between the (label+description) and the input though. |
…eVars Remove --leading-* tokens entirely from tokens.stylex.ts (lineHeightDefaults, lineHeightVars, lineHeightRaw, LineHeightVarName). All internal usage was already migrated to semantic typeScaleVars leading tokens. The v0.0.8 codemod now handles the full migration for external consumers: - String renames: '--leading-base' → '--text-body-leading' (etc.) - Identifier renames: lineHeightVars → typeScaleVars, lineHeightDefaults → typeScaleDefaults (imports + all references) This is the only case where a Vars object name changes — all other token renames (color, size, radius, shadow, font, type scale) keep the same Vars object, so string replacement alone is sufficient. Co-authored-by: Navi <[email protected]>
With the leading token migration, the line-height on descriptions is now correct and the 4px gap between label and description is visually redundant. Wrap label+description in a labelGroup div so the container gap (--spacing-1) only applies between (label+description) and the input control, not between label and description. Co-authored-by: Navi <[email protected]>
…meEditor lineHeightDefaults was removed in #894 (token rename). Line height tokens are now part of typeScaleDefaults (--text-*-leading). Co-authored-by: Navi <[email protected]>
* feat(storybook): add Internal Web Apps Analytics dashboard story Two-tab dashboard comparing Intern (www) vs Nest platform adoption and design system metrics. Built entirely with XDS components. Overview tab: - 4 stat cards (tools, apps, WAU) with % change indicators - DAU line chart (Intern vs Nest, 14d) - New tool/app creation line chart Design Systems tab: - 3 stat grids: Components, Insertions, Tools/Apps Using - Quick link buttons - XDS on Intern details section with: - Component count timeline chart - Oncalls by org horizontal bar chart - Searchable component adoption table with pagination Components used: XDSCard, XDSTabList, XDSTable, XDSPagination, XDSTextInput, XDSButton, XDSLink, XDSDivider, XDSHeading, XDSText Charts: inline SVG (no external dependencies) Co-authored-by: Navi <[email protected]> * feat(storybook): update analytics dashboard with XDSTopNav, tabs, adoption table, two-column charts * feat(storybook): add info/refresh/link icons to chart cards, tighten spacing * feat(storybook): search button, chart title updates, dropdown filter * feat(storybook): dynamic library dropdown, color tokens, dialog improvements, table icons, layout refinements * feat(storybook): add top bar and toolbar to Theme Editor * fix: update ThemeEditor imports for current API (elevationDefaults→shadowDefaults, icon path) * fix: replace removed lineHeightDefaults with typeScaleDefaults in ThemeEditor lineHeightDefaults was removed in #894 (token rename). Line height tokens are now part of typeScaleDefaults (--text-*-leading). Co-authored-by: Navi <[email protected]> --------- Co-authored-by: Navi <[email protected]> Co-authored-by: cixzhang <[email protected]> Co-authored-by: Navi <[email protected]>
* refactor: rename design tokens to match new naming convention
Renames all design tokens based on the token spec spreadsheet.
Token renames (134 files, ~1400 lines changed):
- Color palette: --color-{color}-{type} → --color-{type}-{color}
- Backgrounds: --color-wash/surface/card/popover/muted → --color-background-*
- Text: --color-text-link → --color-text-accent
- Media: --color-text-on-dark-media → --color-on-dark
- Effects: --color-hover-tint → --color-tint-hover
- Status: --color-secondary → --color-neutral
- Size: --size-sm/md/lg → --size-element-sm/md/lg
- Radius: numeric (--radius-0..4) → semantic (--radius-none/inner/element/container/full)
- Shadow: --shadow-base/menu/hover/dialog → --shadow-low/med/high
- Shadow inset: --inset-shadow-border-* → --shadow-inset-*
- Font family: --font-body/code/heading → --font-family-body/code/heading
- Font size: --text-* → --font-size-*
- Type scale: --heading-*-size/weight/leading → --text-heading-*-size/weight/leading
Token removals:
- --color-ring-focus → replaced with --color-accent
- --color-ring-focus-error/success/warning → replaced with --color-error/success/warning
- --color-border-strong → replaced with --color-border-emphasized
- --radius-4 → replaced with --radius-container
- --shadow-base → replaced with --shadow-low
NOT included in this PR (needs discussion):
- --leading-* line height tokens (spreadsheet says remove, but heavily used in ~69 files)
- New tokens: --color-on-accent/success/error/warning, --color-on-light, --color-icon-accent, --border-width
* feat: add --border-width token and replace hardcoded 1px borders
Adds new --border-width token (default: 1px) to borderDefaults/borderVars.
Replaces all hardcoded 1px border widths across 16 component files with
borderVars['--border-width'] for theme-ability.
Affected components: Card, CheckboxInput, DateInput, Field, List,
RadioList, Selector, SideNav, TabList, Table, TimeInput, TopNav,
CodeBlock, CodeEditor.
* feat: add new tokens from spec (on-accent, on-success, on-error, on-warning, on-light, icon-accent)
New tokens per spreadsheet:
- --color-on-accent: #000000 / #000000
- --color-on-success: #000000 / #000000
- --color-on-error: #000000 / #000000
- --color-on-warning: #0A1317 / #0A1317
- --color-on-light: #000000 / #000000
- --color-icon-accent: #0064E0 / #2694FE
* fix: update tests, codemods, and generation logic for new token names
- Fix expandRadiusScale: remove duplicate --radius-container (from old --radius-4)
- Fix expandTypeScale: generate --text-heading-N-* instead of --heading-N-*
- Fix defineTheme: reference --text-heading-N-* in prose CSS generation
- Update codemods to target final token names (skip intermediate v0.0.6 names)
- Update all test expectations to match new token names
* fix: update --color-on-accent/success/error values to #FFFFFF
* refactor: remove --color-icon-on-dark token, replace with semantic alternatives
Per spreadsheet: remove --color-icon-on-dark and use --color-on-* tokens.
Replacements:
- CheckboxInput (checkmark + indeterminate mark) → --color-on-accent
- NavIcon (icon on accent circle) → --color-on-accent
- RadioList (inner dot on accent radio) → --color-on-accent
- Spinner (onMedia shade) → --color-on-dark
Also:
- Restore v0.0.6 codemods to original state (per review feedback)
- Add new v0.0.8 codemod for token renames with tests
* fix: remove --color-info tokens, fix neutral theme duplicates, fix test assertions
- Remove --color-info and --color-info-muted (per Cindy's review)
- Fix duplicate token keys in neutral theme (--color-accent, --color-error,
--color-success, --color-warning, --color-border-emphasized, --shadow-low)
- Fix expandTypeScale test: --heading-N-leading → --text-heading-N-leading
- Fix generateThemeRules test: var(--text-) → var(--font-size-)
* fix: remove duplicate borderVars imports, fix defineTheme test token count
- CodeBlock and CodeEditor had duplicate borderVars in imports
- defineTheme test filter updated: --heading- → --font-size- | --text-
* refactor: migrate lineHeightVars to semantic typeScaleVars leading tokens
Replace raw lineHeightVars['--leading-*'] with the corresponding
typeScaleVars['--text-{semantic}-leading'] based on each component's
paired fontSize token:
- --text-body-size → --text-body-leading (12 usages)
- --text-label-size → --text-label-leading (14 usages)
- --text-supporting-size → --text-supporting-leading (26 usages)
- --text-large-size → --text-large-leading (3 usages)
For Breadcrumbs, moved lineHeight from shared root styles into
size-specific variants (defaultSize/supportingSize) since each
variant maps to a different semantic leading token.
Only remaining lineHeightVars usage: CheckboxInput description
(--font-size-xs / 10px) which has no semantic type scale token.
37 files changed, 64 raw token references replaced with semantic ones.
* refactor: migrate CheckboxInput description to supporting text tokens
Replace raw textSizeVars['--font-size-xs'] (10px) and
lineHeightVars['--leading-relaxed'] with semantic
typeScaleVars['--text-supporting-size'] (12px) and
typeScaleVars['--text-supporting-leading'].
This completes the lineHeightVars migration — zero raw leading
token usages remain in components.
* feat: add --radius-page token (16px) for AppShell page corners
Adds --radius-page (16px) to support concentric corner radii when cards
(12px radius) are nested inside pages with 16px padding:
page radius (16px) = card radius (12px) + page padding (4px gap)
- Added to radiusDefaults and expandRadiusScale (base * 4 * multiplier)
- AppShell elevated backdrop now uses --radius-page instead of --radius-container
- Updated radius scale tests
---------
Co-authored-by: ernestt <[email protected]>
* feat(storybook): add Internal Web Apps Analytics dashboard story Two-tab dashboard comparing Intern (www) vs Nest platform adoption and design system metrics. Built entirely with XDS components. Overview tab: - 4 stat cards (tools, apps, WAU) with % change indicators - DAU line chart (Intern vs Nest, 14d) - New tool/app creation line chart Design Systems tab: - 3 stat grids: Components, Insertions, Tools/Apps Using - Quick link buttons - XDS on Intern details section with: - Component count timeline chart - Oncalls by org horizontal bar chart - Searchable component adoption table with pagination Components used: XDSCard, XDSTabList, XDSTable, XDSPagination, XDSTextInput, XDSButton, XDSLink, XDSDivider, XDSHeading, XDSText Charts: inline SVG (no external dependencies) Co-authored-by: Navi <[email protected]> * feat(storybook): update analytics dashboard with XDSTopNav, tabs, adoption table, two-column charts * feat(storybook): add info/refresh/link icons to chart cards, tighten spacing * feat(storybook): search button, chart title updates, dropdown filter * feat(storybook): dynamic library dropdown, color tokens, dialog improvements, table icons, layout refinements * feat(storybook): add top bar and toolbar to Theme Editor * fix: update ThemeEditor imports for current API (elevationDefaults→shadowDefaults, icon path) * fix: replace removed lineHeightDefaults with typeScaleDefaults in ThemeEditor lineHeightDefaults was removed in #894 (token rename). Line height tokens are now part of typeScaleDefaults (--text-*-leading). Co-authored-by: Navi <[email protected]> --------- Co-authored-by: Navi <[email protected]> Co-authored-by: cixzhang <[email protected]> Co-authored-by: Navi <[email protected]>
* refactor: rename design tokens to match new naming convention
Renames all design tokens based on the token spec spreadsheet.
Token renames (134 files, ~1400 lines changed):
- Color palette: --color-{color}-{type} → --color-{type}-{color}
- Backgrounds: --color-wash/surface/card/popover/muted → --color-background-*
- Text: --color-text-link → --color-text-accent
- Media: --color-text-on-dark-media → --color-on-dark
- Effects: --color-hover-tint → --color-tint-hover
- Status: --color-secondary → --color-neutral
- Size: --size-sm/md/lg → --size-element-sm/md/lg
- Radius: numeric (--radius-0..4) → semantic (--radius-none/inner/element/container/full)
- Shadow: --shadow-base/menu/hover/dialog → --shadow-low/med/high
- Shadow inset: --inset-shadow-border-* → --shadow-inset-*
- Font family: --font-body/code/heading → --font-family-body/code/heading
- Font size: --text-* → --font-size-*
- Type scale: --heading-*-size/weight/leading → --text-heading-*-size/weight/leading
Token removals:
- --color-ring-focus → replaced with --color-accent
- --color-ring-focus-error/success/warning → replaced with --color-error/success/warning
- --color-border-strong → replaced with --color-border-emphasized
- --radius-4 → replaced with --radius-container
- --shadow-base → replaced with --shadow-low
NOT included in this PR (needs discussion):
- --leading-* line height tokens (spreadsheet says remove, but heavily used in ~69 files)
- New tokens: --color-on-accent/success/error/warning, --color-on-light, --color-icon-accent, --border-width
* feat: add --border-width token and replace hardcoded 1px borders
Adds new --border-width token (default: 1px) to borderDefaults/borderVars.
Replaces all hardcoded 1px border widths across 16 component files with
borderVars['--border-width'] for theme-ability.
Affected components: Card, CheckboxInput, DateInput, Field, List,
RadioList, Selector, SideNav, TabList, Table, TimeInput, TopNav,
CodeBlock, CodeEditor.
* feat: add new tokens from spec (on-accent, on-success, on-error, on-warning, on-light, icon-accent)
New tokens per spreadsheet:
- --color-on-accent: #000000 / #000000
- --color-on-success: #000000 / #000000
- --color-on-error: #000000 / #000000
- --color-on-warning: #0A1317 / #0A1317
- --color-on-light: #000000 / #000000
- --color-icon-accent: #0064E0 / #2694FE
* fix: update tests, codemods, and generation logic for new token names
- Fix expandRadiusScale: remove duplicate --radius-container (from old --radius-4)
- Fix expandTypeScale: generate --text-heading-N-* instead of --heading-N-*
- Fix defineTheme: reference --text-heading-N-* in prose CSS generation
- Update codemods to target final token names (skip intermediate v0.0.6 names)
- Update all test expectations to match new token names
* fix: update --color-on-accent/success/error values to #FFFFFF
* refactor: remove --color-icon-on-dark token, replace with semantic alternatives
Per spreadsheet: remove --color-icon-on-dark and use --color-on-* tokens.
Replacements:
- CheckboxInput (checkmark + indeterminate mark) → --color-on-accent
- NavIcon (icon on accent circle) → --color-on-accent
- RadioList (inner dot on accent radio) → --color-on-accent
- Spinner (onMedia shade) → --color-on-dark
Also:
- Restore v0.0.6 codemods to original state (per review feedback)
- Add new v0.0.8 codemod for token renames with tests
* fix: remove --color-info tokens, fix neutral theme duplicates, fix test assertions
- Remove --color-info and --color-info-muted (per Cindy's review)
- Fix duplicate token keys in neutral theme (--color-accent, --color-error,
--color-success, --color-warning, --color-border-emphasized, --shadow-low)
- Fix expandTypeScale test: --heading-N-leading → --text-heading-N-leading
- Fix generateThemeRules test: var(--text-) → var(--font-size-)
* fix: remove duplicate borderVars imports, fix defineTheme test token count
- CodeBlock and CodeEditor had duplicate borderVars in imports
- defineTheme test filter updated: --heading- → --font-size- | --text-
* refactor: migrate lineHeightVars to semantic typeScaleVars leading tokens
Replace raw lineHeightVars['--leading-*'] with the corresponding
typeScaleVars['--text-{semantic}-leading'] based on each component's
paired fontSize token:
- --text-body-size → --text-body-leading (12 usages)
- --text-label-size → --text-label-leading (14 usages)
- --text-supporting-size → --text-supporting-leading (26 usages)
- --text-large-size → --text-large-leading (3 usages)
For Breadcrumbs, moved lineHeight from shared root styles into
size-specific variants (defaultSize/supportingSize) since each
variant maps to a different semantic leading token.
Only remaining lineHeightVars usage: CheckboxInput description
(--font-size-xs / 10px) which has no semantic type scale token.
37 files changed, 64 raw token references replaced with semantic ones.
* refactor: migrate CheckboxInput description to supporting text tokens
Replace raw textSizeVars['--font-size-xs'] (10px) and
lineHeightVars['--leading-relaxed'] with semantic
typeScaleVars['--text-supporting-size'] (12px) and
typeScaleVars['--text-supporting-leading'].
This completes the lineHeightVars migration — zero raw leading
token usages remain in components.
* feat: add --radius-page token (16px) for AppShell page corners
Adds --radius-page (16px) to support concentric corner radii when cards
(12px radius) are nested inside pages with 16px padding:
page radius (16px) = card radius (12px) + page padding (4px gap)
- Added to radiusDefaults and expandRadiusScale (base * 4 * multiplier)
- AppShell elevated backdrop now uses --radius-page instead of --radius-container
- Updated radius scale tests
---------
Co-authored-by: ernestt <[email protected]>
* feat(storybook): add Internal Web Apps Analytics dashboard story Two-tab dashboard comparing Intern (www) vs Nest platform adoption and design system metrics. Built entirely with XDS components. Overview tab: - 4 stat cards (tools, apps, WAU) with % change indicators - DAU line chart (Intern vs Nest, 14d) - New tool/app creation line chart Design Systems tab: - 3 stat grids: Components, Insertions, Tools/Apps Using - Quick link buttons - XDS on Intern details section with: - Component count timeline chart - Oncalls by org horizontal bar chart - Searchable component adoption table with pagination Components used: XDSCard, XDSTabList, XDSTable, XDSPagination, XDSTextInput, XDSButton, XDSLink, XDSDivider, XDSHeading, XDSText Charts: inline SVG (no external dependencies) Co-authored-by: Navi <[email protected]> * feat(storybook): update analytics dashboard with XDSTopNav, tabs, adoption table, two-column charts * feat(storybook): add info/refresh/link icons to chart cards, tighten spacing * feat(storybook): search button, chart title updates, dropdown filter * feat(storybook): dynamic library dropdown, color tokens, dialog improvements, table icons, layout refinements * feat(storybook): add top bar and toolbar to Theme Editor * fix: update ThemeEditor imports for current API (elevationDefaults→shadowDefaults, icon path) * fix: replace removed lineHeightDefaults with typeScaleDefaults in ThemeEditor lineHeightDefaults was removed in #894 (token rename). Line height tokens are now part of typeScaleDefaults (--text-*-leading). Co-authored-by: Navi <[email protected]> --------- Co-authored-by: Navi <[email protected]> Co-authored-by: cixzhang <[email protected]> Co-authored-by: Navi <[email protected]>
* refactor: rename design tokens to match new naming convention
Renames all design tokens based on the token spec spreadsheet.
Token renames (134 files, ~1400 lines changed):
- Color palette: --color-{color}-{type} → --color-{type}-{color}
- Backgrounds: --color-wash/surface/card/popover/muted → --color-background-*
- Text: --color-text-link → --color-text-accent
- Media: --color-text-on-dark-media → --color-on-dark
- Effects: --color-hover-tint → --color-tint-hover
- Status: --color-secondary → --color-neutral
- Size: --size-sm/md/lg → --size-element-sm/md/lg
- Radius: numeric (--radius-0..4) → semantic (--radius-none/inner/element/container/full)
- Shadow: --shadow-base/menu/hover/dialog → --shadow-low/med/high
- Shadow inset: --inset-shadow-border-* → --shadow-inset-*
- Font family: --font-body/code/heading → --font-family-body/code/heading
- Font size: --text-* → --font-size-*
- Type scale: --heading-*-size/weight/leading → --text-heading-*-size/weight/leading
Token removals:
- --color-ring-focus → replaced with --color-accent
- --color-ring-focus-error/success/warning → replaced with --color-error/success/warning
- --color-border-strong → replaced with --color-border-emphasized
- --radius-4 → replaced with --radius-container
- --shadow-base → replaced with --shadow-low
NOT included in this PR (needs discussion):
- --leading-* line height tokens (spreadsheet says remove, but heavily used in ~69 files)
- New tokens: --color-on-accent/success/error/warning, --color-on-light, --color-icon-accent, --border-width
* feat: add --border-width token and replace hardcoded 1px borders
Adds new --border-width token (default: 1px) to borderDefaults/borderVars.
Replaces all hardcoded 1px border widths across 16 component files with
borderVars['--border-width'] for theme-ability.
Affected components: Card, CheckboxInput, DateInput, Field, List,
RadioList, Selector, SideNav, TabList, Table, TimeInput, TopNav,
CodeBlock, CodeEditor.
* feat: add new tokens from spec (on-accent, on-success, on-error, on-warning, on-light, icon-accent)
New tokens per spreadsheet:
- --color-on-accent: #000000 / #000000
- --color-on-success: #000000 / #000000
- --color-on-error: #000000 / #000000
- --color-on-warning: #0A1317 / #0A1317
- --color-on-light: #000000 / #000000
- --color-icon-accent: #0064E0 / #2694FE
* fix: update tests, codemods, and generation logic for new token names
- Fix expandRadiusScale: remove duplicate --radius-container (from old --radius-4)
- Fix expandTypeScale: generate --text-heading-N-* instead of --heading-N-*
- Fix defineTheme: reference --text-heading-N-* in prose CSS generation
- Update codemods to target final token names (skip intermediate v0.0.6 names)
- Update all test expectations to match new token names
* fix: update --color-on-accent/success/error values to #FFFFFF
* refactor: remove --color-icon-on-dark token, replace with semantic alternatives
Per spreadsheet: remove --color-icon-on-dark and use --color-on-* tokens.
Replacements:
- CheckboxInput (checkmark + indeterminate mark) → --color-on-accent
- NavIcon (icon on accent circle) → --color-on-accent
- RadioList (inner dot on accent radio) → --color-on-accent
- Spinner (onMedia shade) → --color-on-dark
Also:
- Restore v0.0.6 codemods to original state (per review feedback)
- Add new v0.0.8 codemod for token renames with tests
* fix: remove --color-info tokens, fix neutral theme duplicates, fix test assertions
- Remove --color-info and --color-info-muted (per Cindy's review)
- Fix duplicate token keys in neutral theme (--color-accent, --color-error,
--color-success, --color-warning, --color-border-emphasized, --shadow-low)
- Fix expandTypeScale test: --heading-N-leading → --text-heading-N-leading
- Fix generateThemeRules test: var(--text-) → var(--font-size-)
* fix: remove duplicate borderVars imports, fix defineTheme test token count
- CodeBlock and CodeEditor had duplicate borderVars in imports
- defineTheme test filter updated: --heading- → --font-size- | --text-
* refactor: migrate lineHeightVars to semantic typeScaleVars leading tokens
Replace raw lineHeightVars['--leading-*'] with the corresponding
typeScaleVars['--text-{semantic}-leading'] based on each component's
paired fontSize token:
- --text-body-size → --text-body-leading (12 usages)
- --text-label-size → --text-label-leading (14 usages)
- --text-supporting-size → --text-supporting-leading (26 usages)
- --text-large-size → --text-large-leading (3 usages)
For Breadcrumbs, moved lineHeight from shared root styles into
size-specific variants (defaultSize/supportingSize) since each
variant maps to a different semantic leading token.
Only remaining lineHeightVars usage: CheckboxInput description
(--font-size-xs / 10px) which has no semantic type scale token.
37 files changed, 64 raw token references replaced with semantic ones.
* refactor: migrate CheckboxInput description to supporting text tokens
Replace raw textSizeVars['--font-size-xs'] (10px) and
lineHeightVars['--leading-relaxed'] with semantic
typeScaleVars['--text-supporting-size'] (12px) and
typeScaleVars['--text-supporting-leading'].
This completes the lineHeightVars migration — zero raw leading
token usages remain in components.
* feat: add --radius-page token (16px) for AppShell page corners
Adds --radius-page (16px) to support concentric corner radii when cards
(12px radius) are nested inside pages with 16px padding:
page radius (16px) = card radius (12px) + page padding (4px gap)
- Added to radiusDefaults and expandRadiusScale (base * 4 * multiplier)
- AppShell elevated backdrop now uses --radius-page instead of --radius-container
- Updated radius scale tests
---------
Co-authored-by: ernestt <[email protected]>
* feat(storybook): add Internal Web Apps Analytics dashboard story Two-tab dashboard comparing Intern (www) vs Nest platform adoption and design system metrics. Built entirely with XDS components. Overview tab: - 4 stat cards (tools, apps, WAU) with % change indicators - DAU line chart (Intern vs Nest, 14d) - New tool/app creation line chart Design Systems tab: - 3 stat grids: Components, Insertions, Tools/Apps Using - Quick link buttons - XDS on Intern details section with: - Component count timeline chart - Oncalls by org horizontal bar chart - Searchable component adoption table with pagination Components used: XDSCard, XDSTabList, XDSTable, XDSPagination, XDSTextInput, XDSButton, XDSLink, XDSDivider, XDSHeading, XDSText Charts: inline SVG (no external dependencies) * feat(storybook): update analytics dashboard with XDSTopNav, tabs, adoption table, two-column charts * feat(storybook): add info/refresh/link icons to chart cards, tighten spacing * feat(storybook): search button, chart title updates, dropdown filter * feat(storybook): dynamic library dropdown, color tokens, dialog improvements, table icons, layout refinements * feat(storybook): add top bar and toolbar to Theme Editor * fix: update ThemeEditor imports for current API (elevationDefaults→shadowDefaults, icon path) * fix: replace removed lineHeightDefaults with typeScaleDefaults in ThemeEditor lineHeightDefaults was removed in #894 (token rename). Line height tokens are now part of typeScaleDefaults (--text-*-leading). --------- Co-authored-by: cixzhang <[email protected]>
Token Renames
Renames all design tokens based on the token spec.
~150 files changed. All renames are name-only — no values were changed.
Summary
Rename Table (99 tokens — names only, all values unchanged)
--color-secondary--color-neutral--color-text-link--color-text-accent--color-text-on-dark-media--color-on-dark--color-icon-on-dark-media--color-icon-on-dark--color-wash--color-background-body--color-surface--color-background-surface--color-card--color-background-card--color-popover--color-background-popover--color-muted--color-background-muted--color-hover-tint--color-tint-hover--color-{color}-background--color-background-{color}--color-{color}-border--color-border-{color}--color-{color}-icon--color-icon-{color}--color-{color}-text--color-text-{color}--size-sm--size-element-sm--size-md--size-element-md--size-lg--size-element-lg--radius-0--radius-none--radius-1--radius-inner--radius-2--radius-element--radius-3--radius-container--radius-rounded--radius-full--shadow-menu--shadow-low--shadow-hover--shadow-med--shadow-dialog--shadow-high--inset-shadow-border-hover--shadow-inset-hover--inset-shadow-border-accent--shadow-inset-selected--inset-shadow-border-positive--shadow-inset-success--inset-shadow-border-warning--shadow-inset-warning--inset-shadow-border-negative--shadow-inset-error--font-body--font-family-body--font-code--font-family-code--font-heading--font-family-heading--text-4xsthrough--text-5xl--font-size-4xsthrough--font-size-5xl0.875remstays0.875rem)--heading-{1-6}-size/weight/leading--text-heading-{1-6}-size/weight/leadingvar()references updated to new font-size names)Removed Tokens (12 —⚠️ = replacement has different value)
--color-ring-focus#0171E3/#2694FE--color-accent#0064E0/#2694FE--color-ring-focus-error#E3193B/#F5394F--color-error#E3193B/#F5394F--color-ring-focus-success#0D8626/#0D8626--color-success#0D8626/#0D8626--color-ring-focus-warning#F2C00B/#E9AF08--color-warning#E9AF08/#F2C00B--color-border-strong#647685/#6F747C--color-border-emphasized#CCD3DB/#494D53--radius-416px--radius-page16px--shadow-base0px 0px 1px ...--shadow-low0px 1px 1px ... 0px 2px 8px ...--color-icon-on-dark#FFFFFF/#FFFFFF--color-on-accentor--color-on-dark#FFFFFF/#FFFFFF--color-info#5B08D8/#6B1EFD--color-info-muted#7952FF33/#5B08D83F--leading-tight/snug/base/normal/relaxedtypeScaleVars['--text-*-leading']--color-icon-on-darkreplacement details--color-on-accent--color-on-accent--color-on-accentonMediashade--color-on-dark--leading-*migration (by @ernestt)Components now use semantic
typeScaleVarsleading tokens matched to their fontSize:--leading-base→--text-body-leadingor--text-label-leading(exact match)--leading-snug/tight→--text-supporting-leading(matched to supporting font size)--leading-normal→--text-body-leadingor--text-large-leading(matched to font size)lineHeightVars(uses--font-size-xswith no semantic match)New Tokens (8)
--color-on-accent#FFFFFF/#FFFFFF--color-on-success#FFFFFF/#FFFFFF--color-on-error#FFFFFF/#FFFFFF--color-on-warning#0A1317/#0A1317--color-on-light#000000/#000000--color-icon-accent#0064E0/#2694FE--border-width1px(replaces hardcoded1pxborders in 16 files)--radius-page16px(for AppShell page corners — supports concentric radii with nested cards)Codemods
v0.0.6 codemods are unchanged (they still migrate to v0.0.6 names).
New v0.0.8 codemod (
migrate-token-renames.mjs) handles migration from v0.0.6 names to these final names. Covers all 99 renames + 12 removals.