fix(design-data): decompose background/opacity + misc fusion residue (284.6, 284.7, 284.8) - #1314
Merged
Merged
Conversation
Splits property fusion missed by 284.3 into structured name fields.
- color-aliases.tokens.json: background-opacity-key-focus -> object/property.
- color-component.tokens.json: card-background-loading-color,
table-selected-row-background-opacity (+ variants), tree-view-row-background-hover,
tree-view-selected-row-background-{default,hover} -> object/property.
Closes spectrum-design-data-284.6.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 0778eb3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
🎨 Token Changes ReportTokens Changed (0)Original Branch: This comment was automatically generated by the token diff tool. 🤖 |
Contributor
🧩 Component Schema Changes ReportNo component schema changes detected.This comment was automatically generated by the component schema diff tool. 🤖 |
Contributor
Run report for 0778eb3fTotal time: 3m 24s | Comparison time: 5m 22s | Estimated savings: 1m 58s (36.7% faster)
Expanded report
Changed files |
Finishes the epic-284 property-fusion sweep: registers base/layer/hero variants and rounding-increment, decomposes the last single-off tokens (menu, radio-button, table-border, card-selection, coach-indicator ring, default-font-family, collection-card hero heights, drop-zone cjk-title, side-focus-indicator), and leaves opacity-checkerboard atomic (design asset). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…property (284.8) Splits background-color, border-color, visual-color, and border-opacity into object + property across 353 token entries, resolving the last open surface-colorRole fusion residue (closes spectrum-design-data-284.8). content-color/fill-color remain atomic per prior epic-284 precedent. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…acy-key test apply.test.js's size-decomposition legacy-key check reconstructs the pre-migration property by naively appending the size suffix, but icon-domain tokens (e.g. ui-icon-2x-large) pin a legacyKey that drops the word "size" entirely, so the reconstruction can never match. These tokens' legacy-key preservation is already covered by the Rust-backed migrate roundtrip-verify, same as the other OTHER_DECOMPOSABLE_FIELDS. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…cript resolved was set from legacyKey two lines above, so resolved !== legacyKey could never be true. Dead code — the script's actual correctness was already verified by migrate legacy-verify/roundtrip-verify, not this check. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Description
Three-part follow-up to #1313 (284.3), sweeping up the remaining property-fusion
residue that the earlier audit's
token(legacyKey-shaped) filter missed.284.6 — background/opacity residue
background-opacity-key-focusintoobject/property, matching thesibling
background-*-opacitystate tokens.card-background-loading-color,table-selected-row-background-opacity(+ hover/non-emphasized variants),
tree-view-row-background-hover, andtree-view-selected-row-background-{default,hover}intoobject/property,keeping existing
legacyKeypins.stack-item-selected-background-color-highlightwas left unsplit — it failslegacy-verify with
component: "stack-item"set (the reference legacy JSONhas no
componentfield for this token), andanatomy: "item"isn'tstandaloneScope-flagged, so it would trip a new SPEC-025 error. That's aregistry decision, not a data-only change — out of scope here.
284.7 — final misc single-off residue
base/layer(context) andhero(card emphasis) variant ids.
rounding-increment.background-{base,layer-1,layer-2}-colorsplit into
variant/object/property.default-font-familysimplified to atomicproperty:"font-family".card-selection-background-size,coach-indicator ring rounding-increments,
menu-item-section-divider- height,radio-button-selection-indicator(addsstate:["selected"]),table-border-divider-width,collection-card-minimum-height-hero-*(5),drop-zone-cjk-title-font-size.side-focus-indicator(vertical-tabs selectionindicator) split into
orientation:"vertical"/anatomy:"focus- indicator"/property:"thickness", reusing existing vocabulary.opacity-checkerboard-square-{dark,light}intentionally left atomic — adesign-asset checkerboard swatch, not a styling surface.
284.8 — surface-color legacy alias residue
The remaining
surface-colorRolefusion bucket (179 unique tokens): registeredlegacy-alias atomic property terms (
background-color,border-color,visual-color,border-opacity) that still structurally fused anobjectconcept into
property. Team decision (Slack poll): split all four; leavecontent-color/fill-coloratomic (established precedent).icons.tokens.json, layout-component.tokens.json,
semantic-color-palette.tokens.json: split
background-color→object:"background"+property:"color",border-color→object:"border"+property:"color",visual-color→object:"visual"+property:"color",border-opacity→object:"border"+property:"opacity", across 353 token entries, with anexplicit
legacyKeypin on every changed token.Related Issue
Closes spectrum-design-data-284.6, spectrum-design-data-284.7, and
spectrum-design-data-284.8 (part of epic spectrum-design-data-284,
"Decompose fused token-name property values into structured fields").
Motivation and Context
284.3 (#1313) decomposed the bulk of surface/colorRole/anatomy fusion, but a
re-audit by the actual current
propertyfield (rather than the legacyKey-shaped display string) turned up three more waves of residue: 8 background/
opacity tokens (284.6), a final grab-bag of one-off fusions across components
(284.7), and the last open
surface-colorRolebucket of registeredlegacy-alias properties (284.8). This PR closes all three.
How Has This Been Tested?
cargo run -p design-data-cli -- migrate legacy-verify --reference packages/tokens/src packages/design-data/tokens— byte-identical legacy output.cargo run -p design-data-cli -- migrate roundtrip-verify packages/tokens/src— OK.moon run design-data:validate— 0 SPEC-025 errors.moon run sdk:codegen,moon run sdk:codegen-check,moon run sdk:test,moon run sdk:lint— all pass.moon run :test(JS/AVA across the monorepo) — all pass.node tools/changeset-linter/src/cli.js check --fail-on-warnings— both changesets valid.tools/token-mapping-analyzer— residue now limited to intentionally-atomic tokens (opacity-checkerboard-*,content-color), deprecated tokens (skipped by design), and pre-existing unrelated outliers (stack-item-background-color,border-dash-gap/length, etc.).Screenshots (if appropriate):
N/A — data-only change.
Types of changes
Checklist: