figma-plugin icon indicating copy to clipboard operation
figma-plugin copied to clipboard

update metadata with tokenSetsData in useChangedState

Open akshay-gupta7 opened this issue 9 months ago • 6 comments

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)

akshay-gupta7 avatar May 19 '25 14:05 akshay-gupta7

🦋 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

changeset-bot[bot] avatar May 19 '25 14:05 changeset-bot[bot]

⤵️ 📦 ✨ The artifact was successfully created! Want to test it? Download it here 👀 🎁

github-actions[bot] avatar May 19 '25 14:05 github-actions[bot]

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)

github-actions[bot] avatar May 19 '25 14:05 github-actions[bot]

Commit SHA:7e065e1817468833b7dfeeee6516f831449067c5 Current PR reduces the test coverage percentage by 1 for some tests

github-actions[bot] avatar May 19 '25 14:05 github-actions[bot]

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

sonarqubecloud[bot] avatar May 27 '25 19:05 sonarqubecloud[bot]

Dont think this is the right approach. Actually unable to reproduce the original issue anymore, were you?

six7 avatar May 28 '25 06:05 six7