Skip to content

Menu: Increase the checkbox checkmark size - #86974

Merged
ciampo merged 4 commits into
trunkfrom
codex/menu-checkmark-size
Nov 19, 2026
Merged

ciampo merged 4 commits into
trunkfrom
codex/menu-checkmark-size

Conversation

@ciampo

@ciampo ciampo commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What?

Increase the Menu.CheckboxItem checkmark from 16px to 20px, without otherwise changing any spacing / layout metrics.

Why?

Give the checkmark more visual weight within the 16px selection column.

How?

Set size={ 20 } on Icon, give its wrapper position: relative and the SVG position: absolute, and remove the 1px vertical translation.

Testing Instructions

  1. Run npm run storybook:dev and open Components → @wordpress-ui → Menu → Checkbox Items.
  2. Open Columns and toggle items with and without prefix icons. Check the larger checkmarks and their alignment with the labels.
  3. Switch to RTL and dark mode. Narrow the viewport until labels wrap and check that each checkmark aligns with the first line.
  4. Open Radio Items and check the selection indicators and labels.

Testing Instructions for Keyboard

  1. Focus Columns and press Enter to open the menu.
  2. Use the arrow keys to move between items and Space to toggle them.
  3. Press Escape and confirm focus returns to Columns.

Screenshots or screencast

Local Checkbox Items story in Chrome, light theme, LTR. Both captures use the same 2528×1489 viewport and 192×256 crop. The baseline is e485545c081.

Before After
Menu with a 16px checkmark Menu with a centered 20px checkmark

Use of AI Tools

Implemented and verified with Codex, including an independent local agent review.

@ciampo ciampo added the [Type] Enhancement A suggestion for improvement. label Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 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: ciampo <mciampini@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: jasmussen <joen@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.


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: +39 B (0%)

Total Size: 8.68 MB

📦 View Changed
Filename Size Change
build/scripts/block-editor/index.min.js 556 kB +16 B (0%)
build/scripts/components/index.min.js 345 kB +8 B (0%)
build/scripts/edit-site/index.min.js 382 kB +17 B (0%)
build/scripts/editor/index.min.js 572 kB +2 B (0%)
build/scripts/media-utils/index.min.js 238 kB -4 B (0%)

12cd38b Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 300e1cd trunk % Change
timeToFirstByte 41.1 ms +4.99% -4.62% 39 ms +6.15% -2.95% 5.38%
largestContentfulPaint 64 ms +12.5% -3.13% 62 ms +9.68% -3.23% 3.23%
lcpMinusTtfb 23 ms +35.65% -6.09% 22.6 ms +23.67% -5.09% 1.77%
wpBeforeTemplate 21.2 ms +4.86% -4.39% 19.88 ms +5.38% -0.96% 6.64%
wpTemplate 15.92 ms +5.28% -1.95% 15.68 ms +3.89% -3.64% 1.53%
wpTotal 37.69 ms +5.07% -4.22% 35.64 ms +6.2% -2.81% 5.75%
wpMemoryUsage 7.75 MB +0% -0% 7.71 MB +0% -0% 0.45%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric 300e1cd trunk % Change
timeToFirstByte 33.95 ms +6.48% -2.5% 32.75 ms +3.05% -2.29% 3.66%
largestContentfulPaint 64 ms +3.13% -6.25% 60 ms +0% -0% 6.67%
lcpMinusTtfb 28.75 ms +6.43% -3.83% 27.15 ms +1.29% -7.37% 5.89%
wpBeforeTemplate 18.08 ms +7.74% -1.88% 17.52 ms +3.2% -1.48% 3.2%
wpTemplate 12.73 ms +5.73% -2.59% 12.17 ms +3.45% -3.78% 4.6%
wpTotal 31.34 ms +5.58% -3.45% 29.76 ms +2.72% -1.65% 5.31%
wpMemoryUsage 6.44 MB +0% -0% 6.40 MB +0% -0% 0.56%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric 300e1cd trunk % Change
mediaProcessingJpeg 292.8 ms +0.16% -0.86% 290.43 ms +1.04% -0.42% 0.82%
mediaProcessingAvif 4245.93 ms +1.18% -1.5% 4266.22 ms +1.22% -0.52% -0.48%
mediaProcessingJpegToAvif 2841.86 ms +2.99% -0.17% 2881.54 ms +3.8% -0.95% -1.38%

media-upload

Metric 300e1cd trunk % Change
jpegUploadProcessing 1454.72 ms +0.77% -0.57% 1442.71 ms +2.31% -0.57% 0.83%
pngUploadProcessing 211.14 ms +6.18% -6.31% 200.92 ms +2.72% -5.33% 5.09%
largeJpegUploadProcessing 1436.45 ms +0.32% -0.39% 1436.71 ms +0.89% -0.46% -0.02%
multipleImageUploadProcessing 1509.89 ms +0.34% -0.86% 1493.81 ms +0.24% -0.29% 1.08%

post-editor

Metric 300e1cd trunk % Change
serverResponse 334.97 ms +1.63% -12.41% 329.85 ms +0.76% -11.12% 1.55%
firstPaint 355.35 ms +13.33% -11.24% 320.27 ms +7.77% -2.54% 10.95%
domContentLoaded 655.24 ms +4.92% -2.17% 648.32 ms +1.99% -0.52% 1.07%
loaded 656.14 ms +4.92% -2.17% 649.34 ms +1.95% -0.56% 1.05%
firstContentfulPaint 371.54 ms +8.39% -4.38% 365.99 ms +4.44% -1.16% 1.52%
firstBlock 1722.56 ms +6.79% -0.46% 1757.07 ms +1.39% -1.02% -1.96%
type 15.43 ms +10.56% -8.75% 17.9 ms +33.58% -12.79% -13.8%
typeWithoutInspector 15.91 ms +0.75% -12.82% 15.42 ms +8.11% -11.61% 3.18%
typeWithTopToolbar 19.07 ms +7.5% -9.12% 20.13 ms +7.6% -9.94% -5.27%
typeContainer 7.22 ms +3.46% -11.5% 6.87 ms +11.64% -6.55% 5.09%
focus 99.1 ms +2.87% -6.84% 89.03 ms +5.36% -3% 11.31%
firstFocus 224.43 ms +0% -0% 204.16 ms +0% -0% 9.93%
selectAll 318.31 ms +7.24% -1.91% 323.87 ms +0.12% -0.04% -1.72%
undo 24.25 ms +7.92% -5.32% 24.37 ms +8.74% -2.59% -0.49%
listViewOpen 61.54 ms +7.25% -1.74% 61.68 ms +1.86% -5.32% -0.23%
inserterOpen 35.51 ms +3.63% -9.6% 35.23 ms +10.84% -4.26% 0.79%
inserterHover 9.43 ms +7.32% -3.82% 9.42 ms +12.42% -3.82% 0.11%
inserterSearch 7.42 ms +1.48% -6.33% 6.79 ms +9.13% -6.33% 9.28%
loadPatterns 503.56 ms +4.2% -3.93% 525.84 ms +4.99% -4.02% -4.24%
wpTotal 326.17 ms +1.37% -12.86% 321.15 ms +0.74% -11.37% 1.56%
wpMemoryUsage 14.81 MB +0% -0% 14.77 MB +0% -0% 0.25%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric 300e1cd trunk % Change
serverResponse 469.96 ms +2.59% -5.1% 469.2 ms +2.1% -7.19% 0.16%
firstPaint 474.04 ms +1.82% -14.04% 464.37 ms +2.41% -11.64% 2.08%
domContentLoaded 840.69 ms +4.73% -1.71% 840.78 ms +1.35% -0.65% -0.01%
loaded 841.92 ms +4.71% -1.72% 841.7 ms +1.37% -0.65% 0.03%
firstContentfulPaint 477.4 ms +1.1% -2.59% 472.43 ms +2.24% -2.12% 1.05%
firstBlock 2590.35 ms +7.61% -1.25% 2582.61 ms +1.09% -0.52% 0.3%
type 18.68 ms +4.93% -11.3% 18.85 ms +14.38% -7.75% -0.9%
navigate 113.3 ms +1.72% -1.46% 112.34 ms +11.63% -2.9% 0.85%
loadPatterns 1300.69 ms +8.71% -6.35% 1474.05 ms +5.72% -4.26% -11.76%
loadPages 962.51 ms +2.71% -1.54% 1003.63 ms +0.78% -3.69% -4.1%
wpTotal 460.44 ms +2.65% -5.21% 459.58 ms +2.16% -7.32% 0.19%
wpMemoryUsage 12.82 MB +0% -0% 12.79 MB +0% -0% 0.25%
wpDbQueries 45 +0% -0% 45 +0% -0% 0%

12cd38b 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 select synced pattern in /test/e2e/specs/editor/various/writing-flow.spec.js, passed after 1 failed attempt.
Error: expect(locator).toBeFocused() failed

Locator:  locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/block"]')
Expected: focused
Received: inactive
Timeout:  5000ms

Call log:
  - Expect "toBeFocused" locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/block"]') with timeout 5000ms
  - waiting for locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/block"]')
    14 × locator resolved to <div tabindex="0" role="document" draggable="true" data-title="Pattern" data-type="core/block" data-is-drop-zone="true" aria-label="Block: Pattern" id="block-8be5a6e3-7045-4f2e-98aa-f5d4e7d3f038" data-block="8be5a6e3-7045-4f2e-98aa-f5d4e7d3f038" class="block-editor-block-list__block wp-block is-selected is-reusable block-library-block__reusable-block-container wp-block-block block-editor-block-list__layout">…</div>
       - unexpected value "inactive"

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/writing-flow.spec.js:1464:5

12cd38b Run

@github-actions github-actions Bot added the [Package] UI /packages/ui label Nov 17, 2026
@ciampo
ciampo marked this pull request as ready for review November 17, 2026 17:50
@ciampo
ciampo requested a review from a team as a code owner November 17, 2026 17:50
@ciampo ciampo self-assigned this Nov 17, 2026
@ciampo
ciampo requested a review from a team November 17, 2026 17:51
@github-actions
github-actions Bot requested a review from aduth November 17, 2026 17:51
@jasmussen

Copy link
Copy Markdown
Contributor

Seems okay! I still think there's a future experiment we can do, that couples stroke-width with font-weight, but that's independent of this change.

@fcoveram

fcoveram commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

I like the outcome, it looks better than the tiny and the resting state looks even according to its container.

I might be lacking context, but I wonder if setting a custom size derails from a more consistent use of icons where the icon is designed for a 24px wrapper and the icon size should be instead a change in the SVG form.

Regardless of the point above, the icon in Select and Comobobox should look the same. Noting it just in case but likely it's already in your mind.

@jasmussen

Copy link
Copy Markdown
Contributor

I might be lacking context, but I wonder if setting a custom size derails from a more consistent use of icons where the icon is designed for a 24px wrapper and the icon size should be instead a change in the SVG form.

It does and it doesn't. When non-scaling-stroke is not applied, in principle every change in pixel size also changes the stroke-width, which is one of the things pairing stroke-width with font-weight would address.

But, and I'll let Marco correct me if I'm wrong, I think a small change was pushed, which at least enforces a 1px stroke-width when the icon is smaller than 24px.

@mirka mirka 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.

Equivalent changes in select/combobox ready at #87021 🙏

@ciampo

ciampo commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

But, and I'll let Marco correct me if I'm wrong, I think a small change was pushed, which at least enforces a 1px stroke-width when the icon is smaller than 24px.

Not to my knowledge (@jameskoster ?). AFAIK, since #84081, the stroke scales with the SVG, meaning that it's 1.5px when the icon is at size 24, 1.25px when the icon is at size 20, and 1px when the icon is at size 16. So in this case, the new version of the checkmark is drawn with 1.25px stroke width.

@ciampo

ciampo commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

I'm going to merge this PR since it's an improvement over trunk. It doesn't mean we can't iterate more, IMO we should look into potentially using a "narrower" checkmark, on top of considering stroke width tweaks.

@ciampo
ciampo force-pushed the codex/menu-checkmark-size branch from 79b4643 to 706337c Compare November 19, 2026 09:44
@ciampo
ciampo enabled auto-merge (squash) November 19, 2026 09:48
@ciampo
ciampo merged commit 1e81f4a into trunk Nov 19, 2026
84 of 85 checks passed
@ciampo
ciampo deleted the codex/menu-checkmark-size branch November 19, 2026 10:09
@github-actions github-actions Bot added this to the Gutenberg 24.6 milestone Nov 19, 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.

4 participants