-
-
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/ min&max width&height on instances #2842
Conversation
|
@@ -54,8 +53,6 @@ export async function applySizingValuesOnNode( | |||
if ( | |||
node.type !== 'DOCUMENT' | |||
&& node.type !== 'PAGE' | |||
&& node.type !== 'INSTANCE' | |||
&& !isPartOfInstance(node.id) |
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.
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.
as in just the isPartofInstance needs to stay in
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.
If this stays, then this is not the fully fledged fix? Can't see any other changes 😅
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.
It basically just resolves the case descrbied in the issue: if the layer itself is an instance, we want to allow setting sizing related tokens (as this is possibly). However, if its part of an instance this wouldnt work because figma doesnt allow it.
Why does this PR exist?
Closes #2426
What does this pull request do?
Changes the logic to apply min and max-width on instances
Testing this change
Create a component with autolayout
Create an instance of the component
Apply min/max width/height sizing through the plugin
Additional Notes (if any)