Skip to content

update metadata with tokenSetsData in useChangedState #3357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

akshay-gupta7
Copy link
Contributor

@akshay-gupta7 akshay-gupta7 commented May 19, 2025

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)

Copy link

changeset-bot bot commented May 19, 2025

⚠️ No Changeset found

Latest commit: 40fa126

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

Copy link
Contributor

github-actions bot commented May 19, 2025

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

Copy link
Contributor

github-actions bot commented May 19, 2025

Commit SHA:f264211f5ce257e5ad087a3fd8f813d28dcb0f06

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: fix-studio-sync-override-metadata-issue 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 67.51 (0) 58.11 (-0.03) 64.22 (0.02) 67.88 (0.01)
🟢 packages/tokens-studio-for-figma/src/app/components/PullDialog.tsx 66.66 (3.03) 50 (16.67) 50 (16.67) 66.66 (3.03)
🔴 packages/tokens-studio-for-figma/src/hooks/useChangedState.ts 100 (0) 25 (-25) 100 (0) 100 (0)

Copy link
Contributor

github-actions bot commented May 19, 2025

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

@akshay-gupta7 akshay-gupta7 marked this pull request as ready for review May 27, 2025 19:40
@akshay-gupta7 akshay-gupta7 self-assigned this May 27, 2025
@akshay-gupta7 akshay-gupta7 requested a review from six7 May 27, 2025 19:40
Copy link

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@six7
Copy link
Collaborator

six7 commented May 28, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If you pull from Tokens Studio, we seem to have a mismatch in state
2 participants