Skip to content
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

Merged
merged 9 commits into from
Mar 31, 2021

Conversation

carolinan
Copy link
Contributor

@carolinan carolinan commented Mar 11, 2021

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:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@carolinan carolinan marked this pull request as ready for review March 11, 2021 14:53
@carolinan carolinan added the [Block] Template Part Affects the Template Parts Block label Mar 11, 2021
@carolinan carolinan requested a review from scruffian March 12, 2021 02:07
Try to resolve merge conflicts
Remove spacing visualizer which is not working in the site editor
@carolinan
Copy link
Contributor Author

5299632 removed the style attribute that is no longer needed after the merge of #30332

@carolinan carolinan requested a review from youknowriad March 30, 2021 13:00
@youknowriad
Copy link
Contributor

That looks good to me, just want to understand how we should make decisions about which block to support or not.

  • Should we add it to all blocks?
  • Should we add it to container blocks?

I think we should be clear about that and consistent.

Curious about your thoughts here cc @WordPress/gutenberg-core

@youknowriad
Copy link
Contributor

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.

@mtias
Copy link
Member

mtias commented Mar 31, 2021

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.

@mtias mtias added the [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi label Mar 31, 2021
Copy link
Contributor

@youknowriad youknowriad left a 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 :)

@aristath aristath merged commit 84b989d into WordPress:trunk Mar 31, 2021
@github-actions github-actions bot added this to the Gutenberg 10.4 milestone Mar 31, 2021
@gziolo gziolo added the [Type] Experimental Experimental feature or API. label Apr 6, 2021
@gziolo gziolo added the [Type] Feature New feature to highlight in changelogs. label Apr 6, 2021
@gziolo gziolo changed the title Add padding support to template parts Block Library - Template Part: Add padding support to template parts Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Template Part Affects the Template Parts Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Experimental Experimental feature or API. [Type] Feature New feature to highlight in changelogs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants