fix(design-data): resolve inline-value opacity CTRs in figma diff - #1442
Merged
Merged
Conversation
`figma diff` reported 54 component-level opacity tokens as figma-only (e.g. table-row-hover-opacity, popover-border-opacity) even though they exist as inline-value CTRs in packages/design-data/relationships/*.json and are published in @adobe/spectrum-tokens. They were never a corpus gap: `INLINE_CTR_COMPARABLE_SCHEMAS` (graph.rs) excluded opacity.json, so `reindex_relationship_tokens` never indexed them into `relationship_tokens`, and `resolve_relationship_ref` returned None. - **sdk/core/src/graph.rs**: add "opacity.json" to INLINE_CTR_COMPARABLE_SCHEMAS, mirroring the existing dimension/multiplier/gradient-stop handling; add a unit test resolving an inline opacity CTR (table-row-hover-opacity). Verified via `figma diff` against the S2-Web baseline: figma-only 67 -> 13 (all 54 opacity entries resolve; residual 13 are unrelated Banner/Form item/Code/List gaps, filed as 11k.10.12). No new value-mismatch or multi-mode-mismatch entries. Closes spectrum-design-data-11k.10.11. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: e4336bd 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
🧩 Component Schema Changes ReportNo component schema changes detected.This comment was automatically generated by the component schema diff tool. 🤖 |
Contributor
🎨 Token Changes ReportTokens Changed (0)Original Branch: This comment was automatically generated by the token diff tool. 🤖 |
Contributor
Run report for e4336bd1Total time: 2m 25s | Comparison time: 4m 19s | Estimated savings: 1m 54s (44.0% faster)
Changed files |
This was referenced Sep 10, 2026
Merged
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
figma diffwas reporting 54 component-level opacity tokens (e.g.table-row-hover-opacity,popover-border-opacity) asfigma-only, eventhough they already exist as inline-value CTRs in
packages/design-data/relationships/*.jsonand are published in@adobe/spectrum-tokens. This was never a corpus/authoring gap — it was aresolution-wiring bug:
INLINE_CTR_COMPARABLE_SCHEMASingraph.rsexcludedopacity.json, soreindex_relationship_tokensnever indexed these CTRs intorelationship_tokens, andresolve_relationship_refreturnedNoneforthem.
"opacity.json"toINLINE_CTR_COMPARABLE_SCHEMAS, mirroring the existingdimension/multiplier/gradient-stop handling. Verified the synthesized
TokenRecordretains$schema: opacity.jsonsorecord_is_opacitystillfires the 0–1 → 0–100 fraction/percent conversion in
diff_against_source.Also verified the fix covers the bare S2.Color-theme alias form (via
resolve_alias_target) and multi-mode opacity (viadiff_multimode/best_relationship_candidate).(
table-row-hover-opacity) viaresolve_relationship_ref.No token/corpus changes, no exporter (
COLLECTION_SPECS) changes — this ispurely a diff-side resolution fix, and is orthogonal to the upcoming
mode-group collection-model redesign.
Related Issue
Closes
spectrum-design-data-11k.10.11. Corrects the premise ofspectrum-design-data-11k.18, which had deferred these entries as anout-of-scope "corpus migration" — they're CTRs, not missing data.
Motivation and Context
spectrum-design-data-11k.10scoped the Figma Variables mapping gap whenfigma diffreported 2003figma-onlyentries. Its children collapsed thatto 67 via diff-side resolution fixes; this closes the remaining opacity
subset of that residual (the user explicitly scoped this PR to opacity only —
the 13 non-opacity
figma-onlyentries left after this change are the sameclass of issue and are filed as a separate follow-up,
spectrum-design-data-11k.10.12).How Has This Been Tested?
resolve_relationship_ref_resolves_inline_opacity_ctrs.figma diffagainst the S2-Web baseline before/after:figma-onlydropped 67 → 13 — all 54 opacity entries now resolve(mostly
match; multi-mode opacity lands on the per-scheme path). No newvalue-mismatchormulti-mode-mismatchentries were introduced (spotchecked the 5 opacity entries that appear in
multi-mode-mismatch— theywere already there before this change, unrelated to it).
moon run sdk:test: 1420/1420 pass (up from 1417 + 1 skipped).cargo clippy --workspace -- -D warnings: clean.node tools/changeset-linter/src/cli.js check --fail-on-warnings: clean.Screenshots (if appropriate):
N/A
Types of changes
Checklist:
🤖 Generated with Claude Code