Skip to content

Customize Widgets: Polish the header - #87504

Merged
t-hamano merged 6 commits into
trunkfrom
fix/customize-widgets-more-menu-outside-toolbar
Nov 29, 2026
Merged

t-hamano merged 6 commits into
trunkfrom
fix/customize-widgets-more-menu-outside-toolbar

Conversation

@t-hamano

@t-hamano t-hamano commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

What?

Polishes the header of the widgets Customizer:

  • Moves the Options menu out of the "Document tools" toolbar, so it matches the widgets editor and the post editor.
  • Removes the side gaps around the fixed block toolbar.

Why?

How?

  • Render MoreMenu after the NavigableToolbar, and use DropdownMenu instead of ToolbarDropdownMenu.
  • Offset the sidebar padding for the fixed block toolbar, like the header.
  • Adjust the header styles and update the tests for the new keyboard navigation.

Testing Instructions

  1. Activate a classic theme with widget areas (e.g. Twenty Twenty-One) and open Appearance > Customize > Widgets.
  2. Open a widget area.
  3. Open the Options menu (⋮) in the header.
  4. Confirm the popover and the group dividers look the same as the Options menu in Appearance > Widgets.
  5. Enable "Top toolbar" from the Options menu and select a block.
  6. Confirm the block toolbar spans the full width of the sidebar, like the header.

Testing Instructions for Keyboard

The Options menu toggle is now reached with the Tab key from the "Document tools" toolbar, instead of the Right arrow key. This matches the other editors.

Screenshots or screencast

real-menu-before-after real-toolbar-before-after

Use of AI Tools

This PR was authored with Claude Code, and reviewed by the author.

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground Preview in Storybook

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>

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


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: -114 B (0%)

Total Size: 8.73 MB

📦 View Changed
Filename Size Change
build/styles/customize-widgets/style-rtl.css 3.04 kB -37 B (-1.2%)
build/styles/customize-widgets/style-rtl.min.css 2.03 kB -20 B (-0.97%)
build/styles/customize-widgets/style.css 3.04 kB -36 B (-1.17%)
build/styles/customize-widgets/style.min.css 2.03 kB -21 B (-1.02%)

56030ae Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric eada76c trunk % Change
timeToFirstByte 57.7 ms +5.81% -2.43% 56.05 ms +10.62% -0.89% 2.94%
largestContentfulPaint 88 ms +11.36% -0% 86 ms +11.63% -2.33% 2.33%
lcpMinusTtfb 30.7 ms +2.77% -4.89% 29.25 ms +18.46% -3.25% 4.96%
wpBeforeTemplate 30.38 ms +10.96% -1.78% 30.44 ms +6.73% -2.69% -0.2%
wpTemplate 22.94 ms +2.4% -3.1% 22.51 ms +5.78% -4.58% 1.91%
wpTotal 53.76 ms +6.08% -2.62% 52.21 ms +10.86% -0.94% 2.97%
wpMemoryUsage 7.75 MB +0% -0% 7.72 MB +0% -0% 0.45%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric eada76c trunk % Change
timeToFirstByte 48.15 ms +6.33% -1.56% 47.8 ms +7.95% -1.15% 0.73%
largestContentfulPaint 86 ms +2.33% -2.33% 84 ms +4.76% -4.76% 2.38%
lcpMinusTtfb 36.55 ms +1.92% -2.19% 34.65 ms +5.05% -4.18% 5.48%
wpBeforeTemplate 28 ms +7.46% -2.07% 27.78 ms +3.2% -1.55% 0.79%
wpTemplate 16.65 ms +1.8% -3.12% 17.05 ms +2.76% -5.04% -2.35%
wpTotal 44.84 ms +6.6% -1.63% 44.65 ms +6.38% -1.34% 0.43%
wpMemoryUsage 6.44 MB +0% -0% 6.41 MB +0% -0% 0.56%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric eada76c trunk % Change
mediaProcessingJpeg 407.35 ms +1.03% -1.13% 399.97 ms +0.9% -0.66% 1.85%
mediaProcessingAvif 6147.62 ms +0.47% -0.1% 6195.56 ms +0.08% -0.53% -0.77%
mediaProcessingJpegToAvif 4247.84 ms +0.19% -0.26% 4244.41 ms +0.25% -0.33% 0.08%

media-upload

Metric eada76c trunk % Change
jpegUploadProcessing 1987.03 ms +3.82% -22.91% 1978.86 ms +0.6% -22.94% 0.41%
pngUploadProcessing 273.66 ms +2% -2.58% 267.57 ms +1.66% -5.43% 2.28%
largeJpegUploadProcessing 1514.84 ms +30.04% -1.12% 1973.33 ms +1.59% -23.26% -23.23%
multipleImageUploadProcessing 2100.15 ms +0.44% -0.17% 2123.86 ms +1.38% -1.31% -1.12%

post-editor

Metric eada76c trunk % Change
serverResponse 252.63 ms +4.9% -5.67% 233.96 ms +10.33% -1.48% 7.98%
firstPaint 292.42 ms +8.38% -16.25% 263.38 ms +14.83% -7.18% 11.03%
domContentLoaded 528.63 ms +4.23% -3.27% 504 ms +5.93% -0.82% 4.89%
loaded 529.32 ms +4.29% -3.27% 504.84 ms +5.94% -0.86% 4.85%
firstContentfulPaint 299.02 ms +5.99% -3.2% 287.99 ms +13.53% -0.69% 3.83%
firstBlock 1401.48 ms +3.4% -1.74% 1355.85 ms +3.13% -0.59% 3.37%
type 12.39 ms +7.51% -7.83% 12 ms +3.33% -3.42% 3.25%
typeWithoutInspector 12.07 ms +11.68% -11.43% 11.83 ms +8.54% -6.76% 2.03%
typeWithTopToolbar 15.43 ms +6.8% -1.62% 15.33 ms +4.83% -10.24% 0.65%
typeContainer 6.21 ms +14.01% -10.63% 5.85 ms +10.43% -7.86% 6.15%
focus 75.68 ms +4.19% -1.81% 63.42 ms +6.24% -7.9% 19.33%
firstFocus 186.1 ms +0% -0% 157.52 ms +0% -0% 18.14%
selectAll 244.84 ms +0.02% -1% 230.66 ms +0.16% -1.44% 6.15%
undo 24.19 ms +2.03% -7.52% 17.8 ms +7.7% -6.29% 35.9%
listViewOpen 24.01 ms +6.25% -2.29% 23.88 ms +3.85% -4.36% 0.54%
inserterOpen 27.68 ms +4.41% -9.21% 24.31 ms +9.46% -5.76% 13.86%
inserterHover 7.91 ms +6.19% -5.06% 7.6 ms +6.97% -4.47% 4.08%
inserterSearch 5.84 ms +2.91% -2.57% 6.01 ms +4.16% -7.49% -2.83%
loadPatterns 429.07 ms +0.73% -5.93% 405.39 ms +3.16% -2.73% 5.84%
wpTotal 245.98 ms +4.98% -5.98% 226.98 ms +10.86% -1.47% 8.37%
wpMemoryUsage 14.81 MB +0% -0% 14.76 MB +0% -0% 0.33%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric eada76c trunk % Change
serverResponse 331.25 ms +1.52% -9.55% 315.35 ms +4.3% -5.56% 5.04%
firstPaint 398.85 ms +1.88% -3% 319.6 ms +18.04% -1.33% 24.8%
domContentLoaded 704.44 ms +2.24% -1.24% 674.08 ms +2.84% -0.47% 4.5%
loaded 705.34 ms +2.26% -1.24% 674.89 ms +2.84% -0.46% 4.51%
firstContentfulPaint 398.85 ms +4.7% -1.1% 382.49 ms +2.52% -1.43% 4.28%
firstBlock 2180.6 ms +0.66% -2.1% 2129.7 ms +2.01% -1.32% 2.39%
type 16.46 ms +8.75% -11% 15.45 ms +13.72% -8.61% 6.54%
navigate 95.65 ms +7.26% -4.01% 93.31 ms +15.8% -5.07% 2.51%
loadPatterns 1120.46 ms +13.38% -3.63% 1106.01 ms +4.01% -3.03% 1.31%
loadPages 948.55 ms +5.54% -3.78% 963.34 ms +8.18% -2.45% -1.54%
wpTotal 322.73 ms +1.54% -9.81% 306.88 ms +4.38% -5.73% 5.16%
wpMemoryUsage 12.84 MB +0% -0% 12.80 MB +0% -0% 0.28%
wpDbQueries 45 +0% -0% 45 +0% -0% 0%

56030ae Run

🏁 Flaky tests

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.

should give the image its context menu while selected @WebKit @Firefox in /test/e2e/specs/editor/blocks/image.spec.js, passed after 1 failed attempt.
Test timeout of 100000ms exceeded.

56030ae Run

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Feature] Widgets Customizer Ability to add and edit blocks in Customize → Widgets. labels Nov 27, 2026
@t-hamano t-hamano self-assigned this Nov 27, 2026
@t-hamano t-hamano changed the title Customize Widgets: Move the Options menu out of the document tools toolbar Customize Widgets: Polish the header Nov 27, 2026
claude and others added 4 commits November 27, 2026 20:57
…olbar

The Options menu was rendered inside the `NavigableToolbar`, so it picked up the `toolbar` variant through the components context system and its popover used the black block toolbar styles. Render it after the toolbar, like the widgets editor and the post editor, and use a plain `DropdownMenu`.

Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
@t-hamano
t-hamano force-pushed the fix/customize-widgets-more-menu-outside-toolbar branch from 7aaca7f to b0bbf93 Compare November 27, 2026 11:57
@t-hamano
t-hamano marked this pull request as ready for review November 27, 2026 11:57
@github-actions
github-actions Bot requested review from aduth and ciampo November 27, 2026 11:58

@ciampo ciampo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 🚀

As a follow-up, it'd be worth looking into moving this menu to Menu from @wordpress/ui. Nothing can fill this menu today, so plugins shouldn't be affected. A few things to keep in mind, though:

  • PreferenceToggleMenuItem renders a @wordpress/components MenuItem, which doesn't work inside Menu. The editor's MoreMenuPreferenceItem is private to @wordpress/editor, so we'd need a local Menu.CheckboxItem that toggles the preference and announces the change.
  • All the items need to move at once. A leftover MenuItem would be skipped by arrow-key navigation.
  • Layering might need some work. The current z-index rule targets .more-menu-dropdown__content, and we'd need to check that a click in the preview still closes the menu.
  • We should keep edit-widgets in step, since that's the editor this one matches. It has the ToolsMoreMenuGroup slot, so it'd also need an adapter like the editor's MoreMenuItem.

claude and others added 2 commits November 29, 2026 10:58
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu
@t-hamano

Copy link
Copy Markdown
Contributor Author

@ciampo Thanks for the review!

As a follow-up, it'd be worth looking into moving this menu to Menu from @wordpress/ui.

Yes, I would be happy to address this in a follow-up: #87619

@t-hamano
t-hamano merged commit 3047421 into trunk Nov 29, 2026
93 of 95 checks passed
@t-hamano
t-hamano deleted the fix/customize-widgets-more-menu-outside-toolbar branch November 29, 2026 11:36
@github-actions github-actions Bot added this to the Gutenberg 24.6 milestone Nov 29, 2026
Vedant-Gandhi pushed a commit to Vedant-Gandhi/gutenberg that referenced this pull request Nov 30, 2026
* Customize Widgets: Move the Options menu out of the document tools toolbar

The Options menu was rendered inside the `NavigableToolbar`, so it picked up the `toolbar` variant through the components context system and its popover used the black block toolbar styles. Render it after the toolbar, like the widgets editor and the post editor, and use a plain `DropdownMenu`.

Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu

* Add changelog entry

Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu

* Remove redundant assertion

Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu

* Remove the side gaps around the fixed block toolbar

Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu

* Use width: auto for the fixed block toolbar offset

Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu

* Scope the Options toggle locators to the header

Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011g9URxg61iAc4ZxQiqFamu

---------

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Widgets Customizer Ability to add and edit blocks in Customize → Widgets. [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants