-
-
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 override order #3138
fix override order #3138
Conversation
🦋 Changeset detectedLatest commit: 216f31f 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 |
|
@@ -5,6 +5,6 @@ | |||
} | |||
variable.setValueForMode(mode, value); | |||
} catch (e) { | |||
console.error('Error setting numberVariable', e); | |||
console.error('Error setting numberVariable on variable', variable.name, e); |
Check warning
Code scanning / ESLint
disallow the use of `console` Warning
Commit SHA:4abe20174c6d4490c43575f712f91ee45506fd3b Test coverage results 🧪
|
Commit SHA:4abe20174c6d4490c43575f712f91ee45506fd3b |
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
Why does this PR exist?
Closes #3139
When we're merging token sets, we weren't ordering token sets as they should. Instead, we were relying on the ordering that existed in the themes. This caused any variable creation or merging of token sets to not respect overrides coming later.
This PR fixes this. In addition, this PR fixes a bug when exporting tokens via Sets - given they both were using that same function I fixed that along the way. Basically, if you exported sets that had math calculations inside, we didnt properly calculate those, as we were only passing in the current set tokens, and not the whole tokens when resolving.
Before
After
Testing this change
Load the .JSON linked in the Issue (single file import). Try to create before and after.
Additional Notes (if any)