tokens-studio / figma-plugin

Official repository of the plugin 'Tokens Studio for Figma' (Figma Tokens)
https://www.figma.com/community/plugin/843461159747178978
MIT License
1.35k stars 194 forks source link

2962 unable to duplicate a token with the same name inside a set #2966

Closed robinhoodie0823 closed 2 months ago

robinhoodie0823 commented 3 months ago

Why does this PR exist?

Current plugin allows users to create a token group that shares a name with existing token.

Closes #2962

What does this pull request do?

Updated logic to prevent creating a token group that shares a name with existing token and updated error message to give more sense.

Testing this change

Additional Notes (if any)

image

changeset-bot[bot] commented 3 months ago

⚠️ No Changeset found

Latest commit: e76459abe670892489beb1506c0fb80ef1ec4209

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

github-actions[bot] commented 3 months ago

Commit SHA:65034f58fbf936fc9347ced0be402d624c07068c

Test coverage results :test_tube:

Code coverage diff between base branch:release-139 and head branch: 2962-unable-to-duplicate-a-token-with-the-same-name-inside-a-set 
Status File % Stmts % Branch % Funcs % Lines
:green_circle: total 67.07 (0) 57.96 (0.01) 63.49 (0) 67.51 (0)
:green_circle: packages/tokens-studio-for-figma/src/app/components/EditTokenForm.tsx 49.01 (0) 32.07 (0.65) 39.58 (0) 50.76 (0)