-
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
Block Library - Template Part: Add padding support to template parts #29779
Block Library - Template Part: Add padding support to template parts #29779
Conversation
Try to resolve merge conflicts Remove spacing visualizer which is not working in the site editor
That looks good to me, just want to understand how we should make decisions about which block to support or not.
I think we should be clear about that and consistent. Curious about your thoughts here cc @WordPress/gutenberg-core |
The visualizer was removed from the group block but as written today it can't work for blocks that have a single wrapper element and that contain other blocks. that said, I'm pretty sure template part has the same issue. |
I think we should restrict it to container blocks for now (Group, Columns, Cover, Template Parts). The UI still needs a bit of polish and could be overwhelming to add to other blocks. That said, as it matures and we polish how we present block attributes (maybe split between Settings and Appearance) it might be fine to add it to more blocks. It could help reduce the need for Spacers, though it's also true that reasoning about padding is harder for users. |
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 PR is ready to go regardless of what blocks should support it :)
Description
Adds support for padding to template parts
Related: WordPress/theme-experiments#223
How has this been tested?
Tested by manually adding a template part in the site editor and adjusting the padding setting.
Because I can't see the padding visualizer in the site editor, I am not sure the changes to edit/index.js actually does anything 😁-the spacing visualizer was removed.Screenshots
Types of changes
Enhancement
Checklist: