update metadata with tokenSetsData in useChangedState
Why does this PR exist?
Closes #3303
What does this pull request do?
Currently when a user has Tokens Studio synced with the plugin, and he pulls changes, even in the cases when there are no changes, he is prompted a delta in metadata configuration, and doesn't pull any changes, leading to a confusing user experience.
Testing this change
- Setup a sync with studio
- Load tokens
- Make changes to studio, the plugin will display the changes and pull as expected
- Now pull again without making any change in studio, now nothing should happen after a loading state.
Additional Notes (if any)
🦋 Changeset detected
Latest commit: 6c8868d99276488b027716dbde0b9943f002c2c6
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 | 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
⤵️ 📦 ✨ The artifact was successfully created! Want to test it? Download it here 👀 🎁
Commit SHA:7e065e1817468833b7dfeeee6516f831449067c5
Test coverage results :test_tube:
Code coverage diff between base branch:main and head branch: fix-studio-sync-override-metadata-issue
| Status | File | % Stmts | % Branch | % Funcs | % Lines |
|---|---|---|---|---|---|
| :red_circle: | total | 67.43 (0) | 57.98 (-0.03) | 64.11 (0.01) | 67.79 (0) |
| :green_circle: | packages/tokens-studio-for-figma/src/app/components/PullDialog.tsx | 66.66 (3.03) | 50 (16.67) | 50 (16.67) | 66.66 (3.03) |
| :red_circle: | packages/tokens-studio-for-figma/src/hooks/useChangedState.ts | 100 (0) | 25 (-25) | 100 (0) | 100 (0) |
Commit SHA:7e065e1817468833b7dfeeee6516f831449067c5 Current PR reduces the test coverage percentage by 1 for some tests
Dont think this is the right approach. Actually unable to reproduce the original issue anymore, were you?
