-
-
Notifications
You must be signed in to change notification settings - Fork 213
Fix load tokens when imported #3423
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
Conversation
🦋 Changeset detectedLatest commit: c84c6ea 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:909f2fbbb73a0987b56784fc41b5b40a86c07567 |
| themes: [], | ||
| activeTheme: {}, | ||
| usedTokenSet: { core: TokenSetStatus.SOURCE, light: TokenSetStatus.ENABLED, theme: TokenSetStatus.ENABLED }, | ||
| shouldUpdate: true, |
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.
this only partially solves the issue.
there was a reason this isnt included in the setDefaultTokens call, and that is.. if you load tokens in a huge document and you'd have "apply to document" set, it means that on load of tokens it will run a document wide change. which can take quite a long time and isnt expected.
intead of just changing shouldUpdate to true - we should rather send an atomic update that just sets the new token values, and doesnt perform the whole other orchestration that comes through shouldUpdate: true
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.
you can reproduce this by:
- load the default tokens
- change a token from those (eg black to red)
- create a rectangle and apply that token you just changed
- create 1.000 replicas of that rectangle
- change mode to "Apply to document"
- Load the default tokens again.
Notice how it will - in this PR - make changes to aaaaaalll rectangles - without you ever requesting it. that's what shouldUpdate will do.
|
Commit SHA:860a494fb8e05d6e92b146e696cf21b34bc23634 |
Why does this PR exist?
Resolves #3408
What does this pull request do?
Testing this change
Additional Notes (if any)