Skip to content

fix(figma): keep literal when redirect replacement cannot be exported - #1537

Merged
GarthDB merged 8 commits into
mainfrom
feat/figma-redirect-deprecated
Oct 21, 2026
Merged

GarthDB merged 8 commits into
mainfrom
feat/figma-redirect-deprecated

Conversation

@GarthDB

@GarthDB GarthDB commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Description

Follow-up to #1531. When --redirect-deprecated finds that a deprecated token's terminal replacement has a value that value_to_figma can't convert (for example 10dp), compute_redirects now skips the redirect. The deprecated token keeps its own literal, and the skip is reported in summary.redirect_skipped as "<token>: replacement '<terminal>' has a value that cannot be exported". Default behavior is unchanged.

Related Issue

Beads spectrum-design-data-0aeb. Follows #1531.

Motivation and Context

#1531 checks that the replacement has an exported variable and the same schema class, but not that its value converts for Figma. A deprecated token could be redirected to a replacement that can't be exported. This keeps the literal and reports why instead.

How Has This Been Tested?

  • moon run sdk:test: passed after merging main (1582 run, 2 skipped), including new redirect_deprecated_keeps_literal_when_replacement_cannot_be_exported
  • moon run sdk:lint: passed
  • moon run sdk:fmt-check: passed
  • moon run sdk:codegen-check: passed
  • pnpm changeset-lint check --fail-on-warnings: passed
  • design-data figma export --redirect-deprecated --dry-run against the S2 Web POC file (read-only): 589 deprecated tokens redirected, no new unexportable-replacement skips (the only unexportable value, android-elevation, has no deprecated token pointing to it). Nothing written to Figma.

Screenshots (if appropriate):

N/A

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.

test and others added 4 commits October 8, 2026 11:52
…replacements

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0b8d2e2

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

Resolve conflicts by taking main's squash-merged #1531 and re-applying only the unexportable-replacement fix; replace the already-released changeset.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@GarthDB GarthDB changed the title feat(figma): add --redirect-deprecated to alias deprecated tokens to replacements fix(figma): keep literal when redirect replacement cannot be exported Oct 13, 2026
@github-actions

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

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 13, 2026 •

Copy link
Copy Markdown
Contributor

Run report for 0b8d2e2d

Total time: 2m 58s | Comparison time: 4m 59s | Estimated savings: 2m 1s (40.4% faster)

Action Time Status Info
⬛️ SetupProto(0.57.4) 0ms Skipped
🟩 SyncWorkspace 10.2ms Passed
🟩 SyncProject(sdk) 0.5ms Passed
⬛️ SetupToolchain(node:20.17.0) 518ms Skipped
⬛️ SetupToolchain(rust:1.88.0) 868.1ms Skipped
🟩 SetupEnvironment(rust, sdk) 97.5ms Passed
⬛️ InstallDependencies(rust, sdk) 2.5ms Skipped
⬛️ SetupToolchain(pnpm:10.17.1) 674.4ms Skipped
⬛️ SetupToolchain(javascript) 0ms Skipped
⬛️ SetupEnvironment(javascript, sdk) 0.5ms Skipped
🟩 RunTask(sdk:fmt-check) 882.6ms Passed
🟩 InstallDependencies(javascript, sdk) 7.4s Passed
🟩 RunTask(sdk:codegen-check) 192.9ms Passed
🟩 RunTask(sdk:lint) 57.1s Passed
🟩 RunTask(sdk:test-doc) 1m 53s Passed
🟩 RunTask(sdk:test) 2m 50s Passed SLOW
Changed files
.changeset/figma-redirect-unexportable.md
AGENTS.md
sdk/plugins/figma/src/mapping/convert.rs
sdk/plugins/figma/src/mapping/tests.rs

test and others added 2 commits October 21, 2026 14:44
@GarthDB
GarthDB marked this pull request as ready for review October 21, 2026 20:54
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@GarthDB
GarthDB merged commit 2c6cb2f into main Oct 21, 2026
9 checks passed
@GarthDB
GarthDB deleted the feat/figma-redirect-deprecated branch October 21, 2026 21:28
@GarthDB GarthDB mentioned this pull request Oct 21, 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