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

Add blockGap as a default control on Columns/Column blocks #49526

Merged
merged 2 commits into from
Apr 3, 2023

Conversation

richtabor
Copy link
Member

What?

The Group block has padding and blockGap as default controls. The Columns and Column blocks should have those same controls enabled by default, as they are very similar to the Group block.

Why?

Consistency. I would expect the similar blocks to have similar experiences right off.

How?

Adding support via the core/columns block.json.

Testing Instructions

  1. Open a Post or Page.
  2. Insert a Columns block.
  3. Open Block Inspector.
  4. See "Block Spacing" as a default option in the "Dimensions" panel.
  5. Repeat steps 2-4 for the Column block.

Screenshots or screencast

Before (Column block is the same):

CleanShot 2023-03-31 at 21 21 53

After (Column block is the same):

CleanShot 2023-03-31 at 21 21 31

@richtabor richtabor added [Type] Enhancement A suggestion for improvement. [Block] Columns Affects the Columns Block labels Apr 1, 2023
@richtabor richtabor requested a review from a team April 1, 2023 01:25
@richtabor richtabor self-assigned this Apr 1, 2023
@richtabor richtabor removed the request for review from ajitbohra April 1, 2023 01:25
@paaljoachim
Copy link
Contributor

paaljoachim commented Apr 1, 2023

Thanks for adding the Block Spacing control to the Columns block, Rich!

Using WordPress 6.2
Theme: Twenty Twenty Three
Browser: Brave

Before:
Screenshot 2023-04-01 at 08 54 45

After:
Using the PR Gutenberg build.
Screenshot 2023-04-01 at 08 57 01

Testing.
Set Black Spacing to 0 in the parent Columns.
Added padding to each column.
Screenshot 2023-04-01 at 09 02 07

Frontend.
Screenshot 2023-04-01 at 09 02 22

It works well!

Copy link
Contributor

@jameskoster jameskoster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit strange how the default spacing and the control seem contradictory:

Screenshot 2023-04-03 at 13 17 07

But I suppose that's just #43082 rearing it's head once again...

@richtabor
Copy link
Member Author

But I suppose that's just #43082 rearing it's head once again...

Yes indeed. :/

@richtabor richtabor merged commit 7754a80 into trunk Apr 3, 2023
@richtabor richtabor deleted the add/columns-blockgap-default-open branch April 3, 2023 18:43
@github-actions github-actions bot added this to the Gutenberg 15.6 milestone Apr 3, 2023
@Marc-pi
Copy link

Marc-pi commented Apr 4, 2023

@richtabor seems it covers #41345 that we can close i guess
nice addition, we can build cards now ;-)

@richtabor
Copy link
Member Author

@richtabor seems it covers #41345

Not quite. That is asking for radius to be added to the individual column blocks.

@Marc-pi
Copy link

Marc-pi commented Apr 4, 2023

hum, i thought you added on columns also. the recurrent need is to build cards, like for services prices (ex: maintenance packs)
from the screenshots above, radius is available on child Column, no ?
or maybe the issue title brings to confusion ??

@richtabor
Copy link
Member Author

from the screenshots above, radius is available on child Column, no ?

This PR makes blockGap visible right off for Columns/Columns, not radius. The parent Columns block supports radius, but the Column block does not currently.

@paaljoachim
Copy link
Contributor

I noticed a draft PR by Aaron which has stopped up located here:
#40925

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Columns Affects the Columns Block Needs User Documentation Needs new user documentation [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants