-
-
Notifications
You must be signed in to change notification settings - Fork 196
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 themes: include fallback logic #3111
Conversation
🦋 Changeset detectedLatest commit: 457fe32 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 |
|
tested this build vs the current prod version:
Tested with (I think) all combinations of export settings. |
@six7 One issue I found: the loader stays indicating 'Create styles', but styles are created. Screen.Recording.2024-09-02.at.12.47.59.mov |
packages/tokens-studio-for-figma/src/plugin/tryApplyTypographyCompositeVariable.ts
Fixed
Show fixed
Hide fixed
Commit SHA:2b58a6f8248151392682110695962105783ae86e Test coverage results 🧪
|
Commit SHA:2b58a6f8248151392682110695962105783ae86e |
This addresses a flaw introduced in 2.0.2
Fixed #3110
Before 2.0.2 we looked at all theme configurations an created styles based on the combination of them all, which wasn't always creating expected results.
In 2.0.2 we changed that to only look at the active theme's selectedSets, but that meant users who didnt have their
references
created properly, got incorrectly created stylesThis PR changes things to have the following logic:
overallConfig
which acts as the baseline, the fallback.Also, it fixes the "Remove styles" problem which was always deleting styles for users when they're not part of the current theme. Now, we look at the overall created styles and then remove those that are not touched, instead of doing so for each theme which is always wrong.
In addition, I'm disabling token-transformer tests. We're not maintaining this anymore, and this changes core logic on the transformer, which doesnt make sense to keep testing now that we have Style Dictionary.