-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Gallery: Avoid creating new layout objects on every render #46715
Conversation
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.
I wonder if it's the same as the default value if we drop it?
Size Change: +3 B (0%) Total Size: 1.32 MB
ℹ️ View Unchanged
|
The default value is Update: Specifying empty alignments is needed to disable them for inner blocks. P.S. The Navigation block uses the same setting. |
Thanks for checking @Mamaduka |
What?
Similar to #30374.
Updates Gallery block to use stable reference object for the layout settings.
Why?
I noticed that the
ImageEdit
component was doing extra rerender due to context and__unstableParentLayout
change. Also, it's a good practice if the setting isn't reactive value.Testing Instructions
The Gallery block should work as before.