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.33k stars 191 forks source link

2956 plugin crash when no unit on dimension token #2957

Closed robinhoodie0823 closed 1 week ago

robinhoodie0823 commented 1 week ago

Why does this PR exist?

Current plugin has in-correct error handling when token name changes. It reset error if name is changed, not token value.

Closes #2956

What does this pull request do?

Updated logic to check validation of token when name changes.

Testing this change

Additional Notes (if any)

https://github.com/tokens-studio/figma-plugin/assets/103296157/ea347b7e-302f-4ddc-aa66-6d2444544467

changeset-bot[bot] commented 1 week ago

⚠️ No Changeset found

Latest commit: 5f5f1391270408aa7e5da49ccbaad1ba10427ad8

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 1 week ago

Commit SHA:b09a2cd203868eabc4e9c1c7ade60f4b46703ecb

Test coverage results :test_tube:

Code coverage diff between base branch:release-139 and head branch: 2956-plugin-crash-when-no-unit-on-dimension-token 
Status File % Stmts % Branch % Funcs % Lines
:green_circle: total 67.07 (0.01) 57.95 (0) 63.49 (0.02) 67.51 (0.01)
:green_circle: packages/tokens-studio-for-figma/src/app/components/EditTokenForm.tsx 49.01 (0.76) 31.42 (0) 39.58 (1.29) 50.76 (0.76)