-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Enhancement: Added individual column and row gap controls. #61453
base: trunk
Are you sure you want to change the base?
Enhancement: Added individual column and row gap controls. #61453
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @realthemes, @davewhitley. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @patil-vipul! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
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.
Thanks for this PR!
Testing this with the Post Template block, I see that the Block Spacing controls now have both horizontal and vertical gap controls. However the behavior depends upon which view the block is set to use
- Grid view: horizontal and vertical block spacing can be set independently ✅
- List view: block spacing controls behave unexpectedly ❌
Screen.Recording.2024-05-31.at.13.05.58.mov
It seems that we need to dynamically change which block gap controls are available based on layout.
cc @andrewserong (who updated blockGap documentation not too long ago), in case I'm missing an easy solution here.
Thanks for working on this @patil-vipul and for the ping @creativecoder.
Yes, this issue appears to be similar to the request for separate vertical and horizontal spacing in the Group (Row) block over in: #60643 Until there's a layout-aware way for us to control which sides are visible (and the output of the gap rules), I don't believe we can enable this feature, unfortunately. |
What?
Fixes #61298
Why?
Limitations in the current Post Template block, inability to independently adjust column gaps without affecting row gaps, thus proposing an enhancement for more precise customization.
How?
Implemented 'sides' property in block.json to enable independent adjustment of column gaps within 'blockGap' spacing support for Post Template block.
Testing Instructions
Query Loop
block.Start Blank
pattern, then chooseTitle & Date
template.Post Template
block from Document Overview to toggle the block controls.Testing Instructions for Keyboard
N/A
Screenshots or screencast