Skip to content

Menu: Reduce selection spacing and prefix icon size - #84015

Closed
ciampo wants to merge 5 commits into
trunkfrom
codex/menu-compact-selection-track
Closed

ciampo wants to merge 5 commits into
trunkfrom
codex/menu-compact-selection-track

Conversation

@ciampo

@ciampo ciampo commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #83993, now merged into trunk.

What?

Match the reference design for selection indicator spacing and prefix icon size.

Why?

Align menu items with the reference design.

How?

Keep the existing CSS grid structure. Use a 20px selection column with no extra gap, 2px leading item padding and 6px trailing item padding, and 20px prefix icons with the existing 4px gap. Keep the 24px checkmark SVG and 5px radio dot.

The rebase removes the alignment changes from #83993 and the AI test dependency fix already shipped on trunk.

Testing Instructions

  1. In Storybook, open Components / @wordpress-ui / Menu and compare Checkbox items, Radio items, and Grouped items.
  2. Check the spacing, icon sizes, and group label and separator alignment in LTR and RTL.

Testing Instructions for Keyboard

  1. Open the menu with Enter, move through items with the arrow keys, and change selections with Space.
  2. Check that indicators stay visible and Escape closes the menu and returns focus to the trigger.

Screenshots

Before screenshots show #83993; after screenshots show the latest revision.

Menu Before After
Check marks Check marks before Check marks after
Radio dots Radio dots before Radio dots after
Plain menu Plain menu before Plain menu after

Here is how the options menu looks like:

Screenshot 2026-10-02 at 15 32 56 Screenshot 2026-10-02 at 15 33 06

Use of AI Tools

Codex rebased the branch, implemented the spacing and icon size changes, and verified them against the Figma spec, Storybook, and existing Menu tests. The After screenshots show the latest revision.

@github-actions github-actions Bot added the [Package] UI /packages/ui label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

🎉 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: ciampo <mciampini@git.wordpress.org>
Co-authored-by: fcoveram <fcoveram@git.wordpress.org>

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

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

📦 Bundle size

Size Change: +326 B (0%)

Total Size: 8.25 MB

📦 View Changed
Filename Size Change
build/scripts/block-editor/index.min.js 516 kB +70 B (+0.01%)
build/scripts/components/index.min.js 333 kB +37 B (+0.01%)
build/scripts/edit-site/index.min.js 385 kB +70 B (+0.02%)
build/scripts/editor/index.min.js 616 kB +80 B (+0.01%)
build/scripts/media-utils/index.min.js 206 kB +69 B (+0.03%)

8c25cf1 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric f1ed27b trunk % Change
timeToFirstByte 56.25 ms +10.76% -1.51% 57.15 ms +8.84% -3.94% -1.57%
largestContentfulPaint 92 ms +8.7% -4.35% 92 ms +6.52% -4.35% 0%
lcpMinusTtfb 35.1 ms +20.8% -7.69% 34.2 ms +13.45% -2.78% 2.63%
wpBeforeTemplate 28.64 ms +9.99% -1.33% 28.1 ms +13.31% -0.53% 1.92%
wpTemplate 24.15 ms +3.81% -3.11% 24.19 ms +6.32% -3.31% -0.17%
wpTotal 52.67 ms +10.54% -1.5% 53.73 ms +7.74% -4.08% -1.97%
wpMemoryUsage 7.63 MB +0% -0% 7.59 MB +0% -0% 0.46%
wpDbQueries 17 +0% -0% 17 +0% -0% 0%

front-end-classic-theme

Metric f1ed27b trunk % Change
timeToFirstByte 47.6 ms +8.3% -1.47% 42.35 ms +5.79% -0.94% 12.4%
largestContentfulPaint 102 ms +3.92% -1.96% 88 ms +4.55% -0% 15.91%
lcpMinusTtfb 53.5 ms +4.49% -0.75% 46.2 ms +4.22% -0.76% 15.8%
wpBeforeTemplate 26.95 ms +8.72% -2.12% 25.85 ms +2.21% -0.81% 4.26%
wpTemplate 17.6 ms +4.55% -1.08% 13.7 ms +3.14% -1.46% 28.47%
wpTotal 44.77 ms +8.02% -1.79% 39.75 ms +5.46% -1.33% 12.63%
wpMemoryUsage 6.25 MB +0% -0% 6.08 MB +0% -0% 2.91%
wpDbQueries 14 +0% -0% 10 +0% -0% 40%

media-processing

Metric f1ed27b trunk % Change
mediaProcessingJpeg 397.01 ms +3.22% -0.29% 397.3 ms +0.45% -0.33% -0.07%
mediaProcessingAvif 6036.45 ms +0.56% -0.14% 6042.5 ms +0.08% -0.3% -0.1%
mediaProcessingJpegToAvif 4152.79 ms +0.31% -0.31% 4161.86 ms +0.03% -0.04% -0.22%

media-upload

Metric f1ed27b trunk % Change
jpegUploadProcessing 1421.15 ms +35.79% -0.8% 1417.85 ms +0.77% -0.32% 0.23%
pngUploadProcessing 176.29 ms +28.78% -2.69% 190.53 ms +18.05% -12.37% -7.47%
largeJpegUploadProcessing 1409.49 ms +0.84% -0.78% 1396.14 ms +0.33% -0.19% 0.96%
multipleImageUploadProcessing 1560.26 ms +2.66% -0.58% 1543.96 ms +11.28% -0.7% 1.06%

post-editor

Metric f1ed27b trunk % Change
serverResponse 517.55 ms +4.34% -7.03% 514.82 ms +4.7% -4.79% 0.53%
firstPaint 295.96 ms +29.68% -19.98% 221.13 ms +41.65% -17.67% 33.84%
domContentLoaded 1083.24 ms +1.35% -2.06% 1084.35 ms +2.15% -0.72% -0.1%
loaded 1084.6 ms +1.35% -2.05% 1085.66 ms +2.16% -0.73% -0.1%
firstContentfulPaint 450.92 ms +2.44% -6.62% 448.49 ms +1.74% -2.64% 0.54%
firstBlock 3315.2 ms +1.17% -1.56% 3276.62 ms +0.63% -0.45% 1.18%
type 17.77 ms +3.55% -3.83% 18.19 ms +2.91% -6.05% -2.31%
typeWithoutInspector 17.72 ms +4.97% -4.29% 17.28 ms +4.46% -5.03% 2.55%
typeWithTopToolbar 22.32 ms +9.99% -1.21% 22.58 ms +4.12% -5.45% -1.15%
typeContainer 8.96 ms +7.03% -4.02% 8.79 ms +8.08% -13.08% 1.93%
focus 74.75 ms +11.4% -6.41% 68.76 ms +12.14% -6.22% 8.71%
firstFocus 193.32 ms +0% -0% 213.07 ms +0% -0% -9.27%
selectAll 543.81 ms +0.62% -1.94% 546.64 ms +1.04% -1.64% -0.52%
listViewOpen 66.48 ms +4.57% -10.63% 63.04 ms +8.22% -10.18% 5.46%
inserterOpen 22.73 ms +7.92% -9.28% 24.05 ms +11.73% -9.65% -5.49%
inserterHover 2.12 ms +9.91% -8.96% 2.09 ms +31.1% -8.61% 1.44%
inserterSearch 8.11 ms +5.18% -10.11% 7.93 ms +4.29% -2.77% 2.27%
loadPatterns 627.65 ms +5.09% -2.42% 642.68 ms +1.24% -3.02% -2.34%
wpTotal 507.67 ms +4.35% -7.27% 504.67 ms +4.72% -4.93% 0.59%
wpMemoryUsage 13.18 MB +0% -0% 13.14 MB +0% -0% 0.28%
wpDbQueries 54 +0% -0% 54 +0% -0% 0%

site-editor

Metric f1ed27b trunk % Change
serverResponse 514.37 ms +6.93% -11.06% 504.64 ms +2.45% -4.89% 1.93%
firstPaint 258.94 ms +76.37% -9.64% 253.67 ms +1.88% -7.03% 2.08%
domContentLoaded 1144.56 ms +1.68% -1.31% 1155.64 ms +1.92% -1.66% -0.96%
loaded 1145.85 ms +1.68% -1.3% 1157.05 ms +1.91% -1.66% -0.97%
firstContentfulPaint 460.41 ms +0.45% -1.99% 460.8 ms +1.88% -1.14% -0.08%
firstBlock 4240.54 ms +1.29% -1.43% 4217 ms +1.31% -1.5% 0.56%
type 18.58 ms +3.12% -5.81% 18.52 ms +3.02% -3.4% 0.32%
navigate 106.37 ms +17.65% -3.67% 104.59 ms +9.35% -0.99% 1.7%
loadPatterns 1370.31 ms +14.87% -0.94% 1341 ms +2.6% -3.14% 2.19%
loadPages 1069.53 ms +1.74% -0.92% 1071.93 ms +3.51% -1.45% -0.22%
wpTotal 504.67 ms +6.96% -11.18% 494.95 ms +2.45% -4.98% 1.96%
wpMemoryUsage 12.14 MB +0% -0% 12.10 MB +0% -0% 0.3%
wpDbQueries 43 +2.33% -0% 43 +2.33% -0% 0%

8c25cf1 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.

persists table layout across all tabs with unified view persistence (Site Editor v2) in /test/e2e/specs/site-editor/pages-view-persistence.spec.js, passed after 1 failed attempt.
Error: apiRequestContext.fetch: socket hang up
Call log:
  - → DELETE http://localhost:8889/wp-json/wp/v2/pages/74?force=true
    - user-agent: Playwright/1.63.0 (x64; ubuntu 24.04) node/24.18 CI/1
    - accept: */*
    - accept-encoding: gzip,deflate,br
    - X-WP-Nonce: 214e4063ee
    - cookie: wordpress_test_cookie=WP%20Cookie%20check; wordpress_logged_in_23778236db82f19306f247e20a353a99=admin%7C1791118798%7CEnkEKTGvz2N0B00TmwREjNB8Q1j5HNAzENVY5LxeNK4%7Ca7a9306df06500a625d527a000f46e20c77239932906a8aa5f62a5c2404c6c53; wp-settings-time-1=1790946271

    at RequestUtils.rest (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/rest.ts:112:39)
    at RequestUtils.call (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/pages.ts:27:20)
    at map (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/pages.ts:56:37)
    at RequestUtils.deleteAllPages (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/pages.ts:56:9)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/pages-view-persistence.spec.js:44:3

8c25cf1 Run

@ciampo ciampo self-assigned this Oct 2, 2026
@ciampo ciampo added the [Type] Enhancement A suggestion for improvement. label Oct 2, 2026
@ciampo
ciampo marked this pull request as ready for review October 2, 2026 08:48
@ciampo
ciampo requested a review from a team as a code owner October 2, 2026 08:48
@ciampo
ciampo requested review from a team and Mamaduka October 2, 2026 08:48
@ciampo ciampo changed the title Menu: Compact selection indicator spacing Menu: Reduce selection spacing and prefix icon size Oct 2, 2026
@fcoveram

fcoveram commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

I shared a design in #83993

Pasting it here for the record.

CleanShot 2026-10-02 at 12 11 32@2x

And the above adapted to the current Editor's options menu in 7.1

CleanShot 2026-10-02 at 12 12 24@2x

Here is the design in Figma with dev notes.

Base automatically changed from menu-align-group-labels to trunk October 2, 2026 11:05
@ciampo
ciampo force-pushed the codex/menu-compact-selection-track branch from b01d7d4 to 327e236 Compare October 2, 2026 11:30
@ciampo

ciampo commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favour of #84028

@ciampo ciampo closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] UI /packages/ui [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants