-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
2.0: let users choose if variables+styles should be applied #2781
Conversation
🦋 Changeset detectedLatest commit: 018b24c 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 |
@@ -69,6 +78,8 @@ export default function ApplySelector() { | |||
|
|||
<DropdownMenu.Portal> | |||
<DropdownMenu.Content side="top"> | |||
{/* TODO: Use DropdownMenu.Label - first add that to `ds` */} |
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.
@@ -1,11 +1,12 @@ | |||
import { clone } from '@figma-plugin/helpers'; | |||
|
|||
export async function unbindVariableFromTarget(target: BaseNode | PaintStyle, key: 'paints' | 'fills' | 'strokes', newPaint: Paint) { |
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.
With this now, it's possible for users to completely detach a system from styles and variables - super awesome!
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.
Only quickly tried this with a manual test - would be good to get a thorough manual QA check.
Code is great - nice work!
Why does this PR exist?
Closes #2618
What does this pull request do?
Gives users a choice if they want to apply styles+variables or raw values. If raw values is chosen, we will always apply raw values when applying to nodes. This effectively allows users to theme-switch even though they've created variables and styles. Before as we would always apply styles - we would not be able to react to theme changes unless the user had set up different variable modes.
Testing this change
Play around with enabling/disabling those settings and try applying various tokens to layers that have styles / variables attached.