Add flex vertical alignment tool to block inspector layout panel#79426
Conversation
|
Size Change: +297 B (0%) Total Size: 7.51 MB 📦 View Changed
|
|
Flaky tests detected in a943837. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/28006677599
|
ramonjd
left a comment
There was a problem hiding this comment.
This matches the existing justification control patterns, and works well in my testing.
Toolpanel resets/updates block tools
Kapture.2026-06-24.at.10.05.37.mp4
| vertical: 'top', | ||
| }; | ||
|
|
||
| const verticalAlignmentOptions = { |
There was a problem hiding this comment.
Guess it'd be nice to co-locate this with
It's pretty static though, so no biggie.
There was a problem hiding this comment.
Hmmm might leave that to a follow-up. Weirdly those only seem to be used in Column and Columns. In Column I can't work out what they're supposed to do, they seem broken. And because Columns uses flex layout we could probably get it to use the native layout control.
|
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: @culturerich. 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. |
What?
Closes #49272.
The vertical alignment tools only exist in the block toolbar. Previously it was feared the layout panel in the block inspector would become too busy, but that's not a problem anymore because we're using ToolsPanel so we can hide most of the tools by default.
This PR adds the alignment tool to the block inspector and hides it by default.
Testing Instructions
Test with blocks that support alignment: Buttons, Row
And with blocks that don't: Navigation, Social Icons (these should not have the control available)
The control should work just like the block toolbar one does, and resetting its value in tools panel should work.
Values should update between inspector and toolbar controls.
Use of AI Tools
Used codex/gpt 5.5