Skip to content
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

fix import of variables speed #3114

Merged
merged 7 commits into from
Sep 10, 2024
Merged

fix import of variables speed #3114

merged 7 commits into from
Sep 10, 2024

Conversation

six7
Copy link
Collaborator

@six7 six7 commented Sep 3, 2024

Why does this PR exist?

Fixes speed of variable creation by ... perceived 100x
Fixes #3122

What does this pull request do?

Properly import variables by not doing it one by one but rather in one swift swoop

Testing this change

Import variables into tokens... also test if you can update existing ones properly as expected

Additional Notes (if any)

Copy link

changeset-bot bot commented Sep 3, 2024

🦋 Changeset detected

Latest commit: 7197f91

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

Copy link
Contributor

github-actions bot commented Sep 3, 2024

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

@rbosker
Copy link
Collaborator

rbosker commented Sep 4, 2024

tested and this improves the import speed a lot

Copy link

deepsource-io bot commented Sep 4, 2024

Here's the code health analysis summary for commits fd68d5a..c52591e. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Shell LogoShell✅ SuccessView Check ↗
DeepSource JavaScript LogoJavaScript❌ Failure
❗ 2 occurences introduced
🎯 1 occurence resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link
Contributor

github-actions bot commented Sep 5, 2024

Commit SHA:7d5ef98e9324869ba4b739e0f86184930f451069

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: six7/fix-import-variables 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 67.96 (0.03) 58.57 (-0.01) 64.63 (0.06) 68.37 (0.02)
🔴 packages/tokens-studio-for-figma/src/app/store/useManageTokens.tsx 82.55 (-0.4) 78.37 (1.45) 75 (-1.47) 82.35 (-0.4)
🟢 packages/tokens-studio-for-figma/src/app/store/models/tokenState.tsx 77.44 (1.19) 64.34 (-0.79) 83.5 (1.09) 77.23 (1.04)
🔴 packages/tokens-studio-for-figma/src/plugin/pullVariables.ts 85.29 (0) 62.74 (-3.11) 100 (0) 84.37 (0)

Copy link
Contributor

github-actions bot commented Sep 5, 2024

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

@six7 six7 removed the request for review from georgebuciuman September 9, 2024 07:52
@six7 six7 marked this pull request as ready for review September 9, 2024 07:55
Copy link
Contributor

@macintoshhelper macintoshhelper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; tested with an import, then updating variables and importing again. Editing existing tokens seems to work too.

Importing variables with the production plugin hangs the plugin/Figma for about ten seconds, import happens in under a second now 💯 🎉

@six7 six7 merged commit 8f97ea6 into main Sep 10, 2024
11 of 12 checks passed
@six7 six7 deleted the six7/fix-import-variables branch September 10, 2024 14:38
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.

Importing variable is slow
4 participants