Skip to content

fix(figma): export valid weights, angles, multipliers and aliases - #1528

Merged
GarthDB merged 4 commits into
mainfrom
fix/figma-skipped-aliases
Oct 1, 2026
Merged

GarthDB merged 4 commits into
mainfrom
fix/figma-skipped-aliases

Conversation

@GarthDB

@GarthDB GarthDB commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Description

Bring the two verified Figma exporter fixes from fix/figma-skipped-aliases into main:

  • d5f191be: export named font weights as STRING and numeric angles as FLOAT, preserve alias target schema types, and report unsupported units.
  • 97f19fca: export unitless multipliers as FLOAT, preserve scalar and terminal mode-set VARIABLE_ALIAS references, and report unsupported alias targets.

Keep existing variable IDs, mode behavior, overrides, and dangling-reference checks. Preserve the regression tests and SDK documentation from both commits. Extend the existing patch changeset for @adobe/design-data-tui to cover both fixes, and normalize SDK README formatting.

The PR changes only the exporter, its CLI audit output/tests, SDK documentation, and one changeset. It does not change canonical token data, package versions, credentials, or snapshot-release branches. Neither fix was present on origin/main, by commit ancestry or patch equivalence, before opening this PR.

Related Issue

Beads task: spectrum-design-data-11k.24, under authoring epic spectrum-design-data-11k.
Related completed verification tasks: spectrum-design-data-98vr and spectrum-design-data-ti02.

Motivation and Context

Valid font weights, angles, multiplier values, and their aliases were skipped or exported with the wrong Figma type. Fix the exporter rather than changing canonical data to work around it. Unsupported units and target schemas now have explicit audit diagnostics.

The exact published snapshot @adobe/spectrum-tokens@0.0.0-size-token-taxonomy-20260930224730 was previously verified offline and written to the Figma POC with complete readback. This task only packages those verified fixes for review; it performs no new Figma write or separate library Publish.

How Has This Been Tested?

Local environment: macOS, repository-pinned Rust toolchain, Node.js 20.17.0, pnpm 10.17.1. Validation ran in a fresh isolated worktree with an existing Cargo target cache; --force bypassed Moon task caching.

Exact command Result
moon run sdk:test sdk:test-doc sdk:lint sdk:fmt-check --force --summary minimal Passed on the PR branch and on a temporary, uncommitted merge with origin/main at 61c5e676: 1,525 tests passed, 2 skipped; 5 doctests passed, 1 ignored; workspace/all-target Clippy with warnings denied and Rust formatting passed.
node tools/changeset-linter/src/cli.js check --fail-on-warnings Passed on the branch and temporary merge; no errors or warnings.
pnpm exec prettier --check .changeset/figma-multiplier-aliases.md sdk/README.md Passed on the branch and temporary merge after normalizing README formatting.
git diff --check Passed.
gh pr checks 1528 --repo adobe/spectrum-design-data --watch --interval 10 Passed. Final verification shows Rust, Node, CI Targets Guard, changeset lint, token/component diff, Adobe CLA, Kodiak, and Snyk checks successful; the unrelated sync-PR enhancement job was skipped.

The temporary merge was aborted after validation. During CI handoff, the remote branch independently merged main in 1dd44f4a; its tree exactly matches the integration tree already tested locally. CI was then watched again and passed on that final head. The full non-SDK monorepo suite was not run locally; the Node CI job passed.

Previously recorded verification artifacts were inspected, not regenerated: offline verification reported zero dangling aliases, unchanged effective default values, and matching offline/live payloads. The prior write readback verified 3,540 mode values, 1,142 alias values, and all 11 requested aliases; 1,559 unrelated variables remained unchanged, no variables were deleted, and numeric error stayed below the recorded 1e-6 tolerance. No new network call to Figma was made for this PR.

Screenshots (if appropriate):

Not applicable; exporter payload and audit regressions are covered by automated tests and prior readback evidence.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

The Adobe CLA check passed. Merge is intentionally left to the maintainer after normal review and CI; auto-merge is not enabled.

test and others added 3 commits October 1, 2026 12:35
Report excluded dp dimensions as unsupported units rather than malformed values.
Preserve leaf schemas through aliases and cover flat, set, audit, and CLI paths.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve variable references and mode-set targets, distinguish unsupported schemas from
unresolved aliases, and cover the eleven skipped snapshot aliases without changing canonical data.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1dd44f4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@adobe/design-data-tui Patch

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

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

🎨 Token Changes Report

Tokens Changed (0)

Original Branch: main


This comment was automatically generated by the token diff tool. 🤖

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

🧩 Component Schema Changes Report

No component schema changes detected.

This comment was automatically generated by the component schema diff tool. 🤖

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Run report for 1dd44f4a

Total time: 2m 3s | Comparison time: 3m 39s | Estimated savings: 1m 35s (43.7% faster)

Action Time Status Info
⬛️ SetupProto(0.57.4) 0ms Skipped
🟩 SyncWorkspace 8.7ms Passed
🟩 SyncProject(sdk) 0.4ms Passed
⬛️ SetupToolchain(node:20.17.0) 213.4ms Skipped
⬛️ SetupToolchain(rust:1.88.0) 382ms Skipped
⬛️ SetupToolchain(pnpm:10.17.1) 177.4ms Skipped
⬛️ SetupToolchain(javascript) 0ms Skipped
⬛️ SetupEnvironment(javascript, sdk) 0.4ms Skipped
🟩 SetupEnvironment(rust, sdk) 84ms Passed
⬛️ InstallDependencies(rust, sdk) 2.3ms Skipped
🟩 RunTask(sdk:fmt-check) 933.6ms Passed
🟩 InstallDependencies(javascript, sdk) 3.5s Passed
🟩 RunTask(sdk:codegen-check) 80.7ms Passed
🟩 RunTask(sdk:lint) 43.4s Passed
🟩 RunTask(sdk:test-doc) 1m 29s Passed
🟩 RunTask(sdk:test) 1m 59s Passed
Changed files
.changeset/figma-multiplier-aliases.md
sdk/README.md
sdk/cli/src/main.rs
sdk/cli/tests/cli_figma_export.rs
sdk/plugins/figma/src/audit.rs
sdk/plugins/figma/src/mapping/convert.rs
sdk/plugins/figma/src/mapping/payload.rs
sdk/plugins/figma/src/mapping/routing.rs
sdk/plugins/figma/src/mapping/tests.rs

@GarthDB
GarthDB merged commit 9acb38a into main Oct 1, 2026
9 checks passed
@GarthDB
GarthDB deleted the fix/figma-skipped-aliases branch October 1, 2026 22:11
@GarthDB GarthDB mentioned this pull request Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant