Skip to content

Add flex vertical alignment tool to block inspector layout panel#79426

Merged
tellthemachines merged 1 commit into
trunkfrom
add/flex-align-in-inspector
Jun 24, 2026
Merged

Add flex vertical alignment tool to block inspector layout panel#79426
tellthemachines merged 1 commit into
trunkfrom
add/flex-align-in-inspector

Conversation

@tellthemachines

Copy link
Copy Markdown
Contributor

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.

Screenshot 2026-06-23 at 4 03 12 pm Screenshot 2026-06-22 at 2 40 50 pm

Use of AI Tools

Used codex/gpt 5.5

@tellthemachines tellthemachines self-assigned this Jun 23, 2026
@tellthemachines tellthemachines added [Type] Enhancement A suggestion for improvement. [Feature] Layout Layout block support, its UI controls, and style output. labels Jun 23, 2026
@github-actions github-actions Bot added the [Package] Block editor /packages/block-editor label Jun 23, 2026
@github-actions

Copy link
Copy Markdown

Size Change: +297 B (0%)

Total Size: 7.51 MB

📦 View Changed
Filename Size Change
build/scripts/block-editor/index.min.js 381 kB +297 B (+0.08%)

compressed-size-action

@github-actions

Copy link
Copy Markdown

Flaky tests detected in a943837.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/28006677599
📝 Reported issues:

@ramonjd ramonjd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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 = {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Guess it'd be nice to co-locate this with

one day to avoid icon/text drift.

It's pretty static though, so no biggie.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@github-actions

Copy link
Copy Markdown

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 props-bot label.

Unlinked Accounts

The 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.

Unlinked contributors: culturerich.

Co-authored-by: tellthemachines <[email protected]>
Co-authored-by: ramonjd <[email protected]>
Co-authored-by: jasmussen <[email protected]>
Co-authored-by: vcanales <[email protected]>
Co-authored-by: jameskoster <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@tellthemachines tellthemachines merged commit 3cc40a7 into trunk Jun 24, 2026
52 of 55 checks passed
@tellthemachines tellthemachines deleted the add/flex-align-in-inspector branch June 24, 2026 00:23
@github-actions github-actions Bot added this to the Gutenberg 23.5 milestone Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Layout Layout block support, its UI controls, and style output. [Package] Block editor /packages/block-editor [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve consistency of alignment tool placement

2 participants