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

2931 20 defining type at the group level is not being persisted in json #2955

Closed robinhoodie0823 closed 2 months ago

robinhoodie0823 commented 3 months ago

Why does this PR exist?

Current plugin has problem in case of group name level token types especially in DTCG format tokens.

Closes #2931

What does this pull request do?

Updated the logic to use correct value of inheritTypeLevel in case of DTCG format token.

Testing this change

Additional Notes (if any)

https://github.com/tokens-studio/figma-plugin/assets/103296157/e5a3a8bd-77ef-4fa5-9762-1d5a9b0b8a00

changeset-bot[bot] commented 3 months ago

⚠️ No Changeset found

Latest commit: ca55815d55b69cb3102ee6be4deb54af902fb8c7

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 2 months ago

Commit SHA:5c113885106e29c204223a78af06e62c158c5e59

Test coverage results :test_tube:

Code coverage diff between base branch:release-139 and head branch: 2931-20-defining-type-at-the-group-level-is-not-being-persisted-in-json 
Status File % Stmts % Branch % Funcs % Lines
:green_circle: total 67.08 (0.01) 57.99 (0.04) 63.49 (0) 67.52 (0.01)
:green_circle: packages/tokens-studio-for-figma/src/utils/convertTokens.tsx 80.39 (0.8) 75.38 (1.61) 83.33 (0) 79.16 (0.9)
:green_circle: packages/tokens-studio-for-figma/src/utils/stringifyTokens.ts 100 (0) 100 (25) 100 (0) 100 (0)