-
-
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
Fixes remove styles logic #3123
Conversation
🦋 Changeset detectedLatest commit: 98b72fa 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 |
|
Commit SHA:93b4a88c90abb2a4ef7a4dcd5d5164c58bce3445 Test coverage results 🧪
|
Commit SHA:93b4a88c90abb2a4ef7a4dcd5d5164c58bce3445 |
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
This changes the logic around removing styles and variables without connection to a token. What we did before was we looked at each theme individually, looked at the tokens created in that go, and then removed any styles that were untouched.
This was flawed as it did not take into account other themes in the same session.
Changed this to look at all themes created, combine their created style ids, and only then remove any that were untouched.
To test this,
Remove styles...
Before, it did - especially if you were only exporting one of your themes - all other styles were always removed. Note this only applies to Styles, not variables!
CleanShot.2024-09-06.at.09.29.56.mp4
CleanShot.2024-09-06.at.10.04.10.mp4