Skip to content

feat: Implement deprecated tokens feature#3834

Open
pvignau wants to merge 1 commit intotokens-studio:mainfrom
pvignau:main
Open

feat: Implement deprecated tokens feature#3834
pvignau wants to merge 1 commit intotokens-studio:mainfrom
pvignau:main

Conversation

@pvignau
Copy link
Copy Markdown

@pvignau pvignau commented Apr 7, 2026

Why does this PR exist?

Closes #0000 - No related issue

Hey there, this is a feature proposal. Me and my team struggle with token lifecycle, mainly about token depreciation.
Around this, this is a first draft to work on it and, I hope, define a workflow for this case.

What does this pull request do?

It updates the UI and some token entity attributed (mainly token deprecated attribute).
Here are the functionality it adds :

  • Token deprecation switch in the token creation/edition modal
  • Deprecation notice on list by highlighting the deprecated ones
  • Possibility to hide deprecated tokens
  • Possibility to not sync deprecated tokens with figma vars
  • DTCG 2025.10 and Legacy format compliant (about deprecation)

Here are some screenshots before and after :
Dashboard - before
Screenshot 2026-04-07 at 16 47 20
Dashboard -after
Screenshot 2026-04-07 at 16 45 46
Creation modal - before
Screenshot 2026-04-07 at 16 47 31
Creation modal - after
Screenshot 2026-04-07 at 16 45 58
Sync variables page - before
Screenshot 2026-04-07 at 16 47 47
Sync variables page - after
Screenshot 2026-04-07 at 16 46 42
Hide deprecated tokens - before
Screenshot 2026-04-07 at 16 48 01
Hide deprecated tokens - after
Screenshot 2026-04-07 at 16 47 02

Deprecated token (DTCG) :

{
  "my": {
    "super": {
      "deprecated": {
        "token": {
          "$deprecated": true,
          "$type": "color",
          "$value": "#3488e6"
        }
      }
    }
  }
}

Deprecated token (Legacy) :

{
  "my": {
    "super": {
      "deprecated": {
        "token": {
          "value": "#3488e6",
          "type": "color",
          "$extensions": {
            "studio.tokens": {
              "deprecated": true
            }
          }
        }
      }
    }
  }
}

Testing this change

You can :

  • Add a deprecated token and a non-deprecated token
  • Try to hide and unhide the token
  • Sync variables with figma with the ignore deprecated tokens switch activated. (no deprecated token should be synced)

Additional Notes (if any)

I've added some translation (thanks Claude 🤖) but I'm no translator.
If a token is deprecated after the variable is synced and the ignore deprecated tokens switch is on, I've arbitrary chose to let the variable live on its own and not delete it (it'd be deleted if the delete variable w/o sync to a token is checked)
This is my first PR here, don't mind about telling me what's right or wrong :)

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 7, 2026

🦋 Changeset detected

Latest commit: f46c9e4

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

This PR includes changesets to release 1 package
Name Type
@tokens-studio/figma-plugin Minor

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

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 10 complexity · 20 duplication

Metric Results
Complexity 10
Duplication 20

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

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