-
-
Notifications
You must be signed in to change notification settings - Fork 197
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 zombie variables #3137
fix zombie variables #3137
Conversation
🦋 Changeset detectedLatest commit: c0b1c1a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
8b8d709
to
81bf10b
Compare
Commit SHA:0e8184ede0ae7f7d0776a5e7c73c3cf0e83e820c Test coverage results 🧪
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Does any usage of figma.variables.getLocalVariables()
need to be replaced with (await getVariablesWithoutZombies())
going forward? Maybe a custom ESLint rule or something could be useful for this to prevent the bug from being reintroduced in the future.
Yes! There's a eslint rule by figma provided here: https://www.figma.com/plugin-docs/migrating-to-dynamic-loading/ we should add that |
Why does this PR exist?
Closes #3140
What does this pull request do?
This adds a check before we gather variables to use for references or for application, to see if the variable collection of those variables still exists.
Testing this change
Open a file affected by this bug (hard to replicate). File in DM with
@rbosker
has this: https://hyma-team.slack.com/archives/D03HL8WE738/p1726231101338089 - https://www.figma.com/design/foDPZl0c28gzctr6ztvNfy/Components-Roberto-(Copy)?t=I2ASNxMojuiwTyTv-0Before
After