feat(design-data): teach Figma export generator to honor name-mapping overrides (11k.5) - #1322
Merged
GarthDB merged 2 commits intoJul 31, 2026
Conversation
🦋 Changeset detectedLatest commit: 2754ec2 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 2754ec28Total time: 2m 50s | Comparison time: 3m 8s | Estimated savings: 17.6s (9.3% faster)
Changed files |
… overrides (11k.5)
`build_export_payload` accepts an optional legacyKey -> Figma name override
map; `figma export` gains a `--mapping <PATH>` flag to load one from a
`figma audit` artifact. Absent or empty overrides preserve today's
{prefix}/{legacyKey} 1:1 naming.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
GarthDB
force-pushed
the
feat/figma-mapping-overrides-11k.5
branch
from
July 31, 2026 05:35
3ad40c2 to
6d86082
Compare
10 tasks
Addresses review feedback on PR #1322 — documents the overrides param on build_export_payload and notes that remapping an existing name produces a CREATE rather than a rename. 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
Stacked on #1321 (11k.4). Extends
build_export_payload(and the internalprocess_*/make_variable_actionhelpers) with an optionaloverrides: Option<&HashMap<String, String>>parameter — a legacyKey → Figma-name map.When a token's legacyKey has an override, the generator emits that name
instead of the default
{prefix}/{legacyKey}; absent or empty overrideskeep today's 1:1 behavior unchanged for every existing caller.
design-data figma exportgains a--mapping <PATH>flag that loads theoverride map from a
figma auditartifact (reads its nestedoverridesfield) or a bare
{legacyKey: name}JSON object, dropping any empty-stringplaceholder entries (the audit's "needs a decision" markers).
Related Issue
spectrum-design-data-11k.5 (bd), depends on spectrum-design-data-11k.4 (#1321)
Motivation and Context
11k.4's audit produces an override scaffold for every naming divergence
between the generator and the real S2–Web file. This closes the loop: once
someone fills in real names for the scaffold's
generated_onlyentries,figma export --mapping <artifact>will actually emit them, moving thegenerator from "1:1 by convention" toward "authoritative for the real file."
How Has This Been Tested?
mapping.rs: one token with an override remaps to theoverride name; a second token with no override still gets the default
{prefix}/{legacyKey}name.mapping.rstests remain green, unchanged.moon run sdk:build && moon run sdk:test && moon run sdk:lint(clippy-D warnings) all pass.node tools/changeset-linter/src/cli.js check --fail-on-warningspasses.Screenshots (if appropriate):
N/A — CLI/library change only.
Types of changes
Checklist: