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

Separate Block Spacing in Row Block into Vertical and Horizontal Options #60643

Open
eric-michel opened this issue Apr 10, 2024 · 6 comments
Open
Labels
[Block] Group Affects the Group Block [Feature] Layout Layout block support, its UI controls, and style output. [Type] Enhancement A suggestion for improvement.

Comments

@eric-michel
Copy link

eric-michel commented Apr 10, 2024

What problem does this address?

The Columns block allows for block spacing to be set separately for vertical and horizontal axes. Since it's a flex container, this sets row-gap and column-gap separately.
image

The Row block does not allow this. It only allows for Block Spacing which just sets the gap property, with no flexibility to have different row and column gaps for when the Row block wraps.
image

What is your proposed solution?

Follow the example of the Columns block and separate vertical from horizontal block spacing settings in the Row block.

@eric-michel eric-michel added the [Type] Enhancement A suggestion for improvement. label Apr 10, 2024
@andrewserong andrewserong added [Feature] Layout Layout block support, its UI controls, and style output. [Block] Group Affects the Group Block labels Apr 10, 2024
@andrewserong
Copy link
Contributor

Thanks for opening this issue, it's a good idea! One technical challenge to implementation is that the Row block is actually a variation of the Group block and there currently isn't a way to opt in for separate sides of gap for a particular variation / layout type. The standard Group block only has a vertical orientation, so wouldn't support separate sides.

So, we'd need some way to indicate "if this block is using flex layout type, expose both directions, otherwise just show a single control".

@eric-michel
Copy link
Author

@andrewserong that totally makes sense! The default vs row variants of the Group block are so distinct that I often forget that they're the same block and not discrete ones.

I'm really excited for the grid variant of the Group block and just checked and see that it will have the same issue, so I do think this is worth making adjustments for! There are definitely a ton of applications for having separate row-gap and column-gap values.

@cbirdsong
Copy link

Has the idea of splitting these increasingly complex layouts option out of the group block been explored? It feels like moving all that into some sort of “layout container” block would allow the group block to return to being a nice basic tool. (Of course, you could still transform a group block into a layout block easily.)

@eric-michel
Copy link
Author

It does seem odd that such disparate functionality is all folded into a single block using only variants to differentiate them. Paragraphs and Headings have a lot more in common with each other than a regular Group vs Grid block, yet they are separate blocks.

@carolinan
Copy link
Contributor

Hi, I believe these two are duplicates? #47084

@eric-michel
Copy link
Author

@carolinan You are correct! I did not see #47084 when I first made this issue. Do you think I should close this one in favor of the other since it's older, or is it better to close the older one since this one has more recent comments and is linked to from #61453?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Group Affects the Group Block [Feature] Layout Layout block support, its UI controls, and style output. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants