Skip to content

Notes: Show emoji-only reaction picker with tooltips - #85566

Closed
Mamaduka wants to merge 1 commit into
trunkfrom
fix/note-reactions-emoji-only-menu
Closed

Mamaduka wants to merge 1 commit into
trunkfrom
fix/note-reactions-emoji-only-menu

Conversation

@Mamaduka

@Mamaduka Mamaduka commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

What?

See #85222.

The add-reaction picker shows only the emoji, with its name in a tooltip, and the popup shrinks to fit.

Why?

The name next to each emoji made the picker wide enough to cover the note being reacted to. @wordpress/ui Menu has no horizontal orientation yet (#85289), so this keeps the vertical menu.

How?

The emoji name moves to the item's aria-label and a Tooltip, and the popup overrides --wp-ui-menu-min-width. The menu's open state is controlled so a single Escape closes it, since the focused item's tooltip otherwise takes the first Escape.

Testing Instructions

  1. Open a post or page, add a paragraph, and add a note to it.
  2. Hover over the note and click "Add reaction". The picker is a narrow column of emoji without names.
  3. Hover an emoji. A tooltip shows its name.
  4. Click Heart. A Heart pill with count 1 appears; reopening the picker shows Heart checked.

Testing Instructions for Keyboard

Same.

Screenshots or screencast

Before After
CleanShot 2026-10-26 at 18 54 01 CleanShot 2026-10-26 at 18 54 30

Use of AI Tools

Assisted by Claude.

Move emoji names into item aria-label and tooltip, shrink popup to fit,
close menu and tooltip with one Escape.

See #85222.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Mamaduka Mamaduka self-assigned this Oct 26, 2026
@Mamaduka Mamaduka added [Type] Enhancement A suggestion for improvement. [Feature] Notes Phase 3 of the Gutenberg roadmap around block commenting labels Oct 26, 2026
@github-actions github-actions Bot added the [Package] Editor /packages/editor label Oct 26, 2026
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground

🎉 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: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: huzaifaalmesbah <huzaifaalmesbah@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: adamsilverstein <adamsilverstein@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: +137 B (0%)

Total Size: 8.55 MB

📦 View Changed
Filename Size Change
build/scripts/editor/index.min.js 555 kB +69 B (+0.01%)
build/styles/editor/style-rtl.css 30.1 kB +17 B (+0.06%)
build/styles/editor/style-rtl.min.css 25.8 kB +18 B (+0.07%)
build/styles/editor/style.css 30.1 kB +17 B (+0.06%)
build/styles/editor/style.min.css 25.8 kB +16 B (+0.06%)

1b71bf8 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric c1db553 trunk % Change
timeToFirstByte 37.95 ms +11.46% -10.8% 34.6 ms +17.92% -3.32% 9.68%
largestContentfulPaint 64 ms +9.38% -0% 62 ms +12.9% -3.23% 3.23%
lcpMinusTtfb 27.5 ms +12.18% -8.73% 25.8 ms +12.6% -6.01% 6.59%
wpBeforeTemplate 19.45 ms +22.16% -5.6% 18.32 ms +25.76% -1.42% 6.17%
wpTemplate 13.67 ms +3.29% -7.02% 13.24 ms +5.29% -6.04% 3.25%
wpTotal 34.32 ms +11.28% -9.7% 31.6 ms +17.15% -3.54% 8.61%
wpMemoryUsage 7.68 MB +0% -0% 7.65 MB +0% -0% 0.43%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric c1db553 trunk % Change
timeToFirstByte 27.8 ms +8.45% -3.78% 29.85 ms +8.04% -3.52% -6.87%
largestContentfulPaint 64 ms +12.5% -3.13% 68 ms +11.76% -0% -5.88%
lcpMinusTtfb 36.2 ms +8.29% -6.08% 39.45 ms +12.8% -6.84% -8.24%
wpBeforeTemplate 17.12 ms +4.79% -2.98% 16.7 ms +4.37% -2.4% 2.51%
wpTemplate 7.87 ms +17.15% -2.8% 10.4 ms +7.79% -3.65% -24.33%
wpTotal 25.37 ms +7.41% -4.18% 27.09 ms +8.79% -2.73% -6.35%
wpMemoryUsage 6.26 MB +0% -0% 6.34 MB +0% -0% -1.22%
wpDbQueries 9 +0% -0% 13 +0% -0% -30.77%

media-processing

Metric c1db553 trunk % Change
mediaProcessingJpeg 232.41 ms +2.78% -1.42% 233.24 ms +1.8% -2.52% -0.36%
mediaProcessingAvif 3771 ms +0.5% -0.18% 3789.47 ms +0.49% -1.17% -0.49%
mediaProcessingJpegToAvif 2621.26 ms +0.78% -1.05% 2623.39 ms +1.62% -2.47% -0.08%

media-upload

Metric c1db553 trunk % Change
jpegUploadProcessing 912.57 ms +0.88% -2.22% 889.17 ms +3.08% -0.35% 2.63%
pngUploadProcessing 174.52 ms +7.92% -5.64% 165.99 ms +4.54% -3.28% 5.14%
largeJpegUploadProcessing 901.22 ms +0.48% -0.23% 884.31 ms +0.55% -0.87% 1.91%
multipleImageUploadProcessing 1007.26 ms +1.11% -0.88% 976.87 ms +12.47% -1.81% 3.11%

post-editor

Metric c1db553 trunk % Change
serverResponse 277.16 ms +9.54% -8.9% 278.82 ms +3.02% -5.32% -0.6%
firstPaint 164.75 ms +99.31% -3.53% 305.56 ms +17.6% -38.88% -46.08%
domContentLoaded 589.8 ms +7.26% -2.78% 591.87 ms +3.02% -2.87% -0.35%
loaded 590.64 ms +7.3% -2.77% 592.78 ms +3.04% -2.85% -0.36%
firstContentfulPaint 357.44 ms +5.41% -8.17% 357.09 ms +6.64% -3.97% 0.1%
firstBlock 1937.11 ms +6.72% -1.87% 1981.27 ms +2.81% -3.23% -2.23%
type 15.83 ms +2.72% -2.91% 14.25 ms +1.75% -2.88% 11.09%
typeWithoutInspector 15.26 ms +7.01% -1.25% 13.27 ms +9.04% -8.44% 15%
typeWithTopToolbar 17.95 ms +13.54% -3.79% 16.52 ms +3.15% -2.6% 8.66%
typeContainer 6.42 ms +5.3% -5.92% 5.83 ms +17.84% -5.15% 10.12%
focus 88.51 ms +2.07% -0.63% 71.18 ms +4.1% -1% 24.35%
firstFocus 172.18 ms +0% -0% 141.07 ms +0% -0% 22.05%
selectAll 345.22 ms +3.59% -3.49% 323.43 ms +0.21% -4.76% 6.74%
listViewOpen 48.9 ms +3.95% -9.28% 45.5 ms +5.54% -2.75% 7.47%
inserterOpen 28.66 ms +3.28% -2.93% 27.37 ms +3.03% -5.3% 4.71%
inserterHover 8.88 ms +7.43% -5.74% 8.82 ms +6.8% -4.31% 0.68%
inserterSearch 6.85 ms +4.82% -5.99% 6.65 ms +6.77% -5.56% 3.01%
loadPatterns 428.98 ms +4.22% -1.55% 449.97 ms +1.98% -7.65% -4.66%
wpTotal 270.65 ms +9.26% -9.06% 272.1 ms +3.09% -5.79% -0.53%
wpMemoryUsage 14.71 MB +0% -0% 14.68 MB +0% -0% 0.24%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric c1db553 trunk % Change
serverResponse 294.65 ms +7.88% -4.99% 296.77 ms +3.6% -6.9% -0.71%
firstPaint 221.25 ms +28.89% -6.54% 195.55 ms +85.27% -14.07% 13.14%
domContentLoaded 685.46 ms +1.79% -1.4% 675.92 ms +0.76% -2.6% 1.41%
loaded 686.33 ms +1.79% -1.43% 676.8 ms +0.77% -2.63% 1.41%
firstContentfulPaint 387.89 ms +1.24% -1.33% 390.19 ms +1.33% -7.15% -0.59%
firstBlock 3115.13 ms +0.98% -2.32% 3068.71 ms +1.23% -3.3% 1.51%
type 15.72 ms +4.83% -4.01% 14.36 ms +2.99% -4.46% 9.47%
navigate 93.13 ms +5.5% -1.42% 107.97 ms +0.85% -7.08% -13.74%
loadPatterns 852.38 ms +10.76% -3.29% 839.34 ms +5.77% -3.55% 1.55%
loadPages 995.28 ms +2.53% -2.09% 999.07 ms +2.28% -2.29% -0.38%
wpTotal 286.65 ms +8.1% -5.15% 288.81 ms +3.65% -7.19% -0.75%
wpMemoryUsage 12.73 MB +0% -0% 12.70 MB +0% -0% 0.24%
wpDbQueries 44.5 +1.12% -1.12% 44.5 +1.12% -1.12% 0%

1b71bf8 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.

Custom Completer: should allow newlines after multiple option completions in /test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 1
+ Received  + 1

@@ -5,11 +5,11 @@
  <!-- wp:paragraph -->
  <p>🫐 test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
- <p>🫐 test</p>
+ <p>🍎 test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
  <p>🫐 test</p>
  <!-- /wp:paragraph -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js:466:6
Delete (forward) in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  -  5
+ Received  + 11

@@ -1,25 +1,31 @@
  Array [
    Object {
      "innerBlocks": Array [
        Object {
          "attributes": Object {
-           "content": "1",
+           "content": "1‸a",
          },
-         "innerBlocks": Array [
+         "innerBlocks": Array [],
+         "name": "core/list-item",
+       },
        Object {
+         "attributes": Object {
+           "content": "2",
+         },
          "innerBlocks": Array [
            Object {
              "attributes": Object {
-                   "content": "a‸2",
+               "ordered": false,
+               "values": "",
              },
-                 "name": "core/list-item",
-               },
+             "innerBlocks": Array [
                Object {
                  "attributes": Object {
                    "content": "b",
                  },
+                 "innerBlocks": Array [],
                  "name": "core/list-item",
                },
              ],
              "name": "core/list",
            },

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:2056:42
User Mention: should allow newlines after multiple mention completions in /test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 1
+ Received  + 1

@@ -1,11 +1,11 @@
  <!-- wp:paragraph -->
  <p>@buddytheelf test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
- <p>@buddytheelf test</p>
+ <p>@@thebetterhobbit test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
  <p>@buddytheelf test</p>
  <!-- /wp:paragraph -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js:466:6
a scoped element outside every block region derives core/body in /test/e2e/specs/interactivity/router-navigation-lifecycle.spec.ts, passed after 1 failed attempt.
Error: apiRequestContext.fetch: socket hang up
Call log:
  - → DELETE http://localhost:8889/wp-json/wp/v2/posts/264?force=true
    - user-agent: Playwright/1.63.0 (x64; ubuntu 24.04) node/24.20 CI/1
    - accept: */*
    - accept-encoding: gzip,deflate,br
    - X-WP-Nonce: 075b59b7f6
    - cookie: wordpress_test_cookie=WP%20Cookie%20check; wordpress_logged_in_23778236db82f19306f247e20a353a99=admin%7C1793199590%7CmRTf8uEbimFbZMKU5H2Y1fUe0U7iXTcg3vvKrro3cYb%7Cec179cdebd64cf2c1cbafbd7658d6b169da0136f8581a849f1dd41dea29249e5; wp-settings-time-1=1793027342

    at RequestUtils.rest (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/rest.ts:111:39)
    at map (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/posts.ts:44:9)
    at RequestUtils.deleteAllPosts (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/posts.ts:43:9)
    at InteractivityUtils.deleteAllPosts (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/interactivity/fixtures/interactivity-utils.ts:91:3)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/interactivity/router-navigation-lifecycle.spec.ts:384:3
can be converted to paragraphs in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 1
+ Received  + 1

  <!-- wp:paragraph -->
- <p>one</p>
+ <p>ne</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
  <p>two</p>
  <!-- /wp:paragraph -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:391:52
inserts a block in proper place after having clicked `Browse All` from inline inserter in /test/e2e/specs/editor/various/inserting-blocks.spec.js, passed after 1 failed attempt.
TimeoutError: locator.click: Timeout 10000ms exceeded.
Call log:
  - waiting for getByRole('button', { name: 'Add block' })
    - locator resolved to <button type="button" aria-pressed="false" aria-haspopup="true" aria-expanded="false" aria-label="Add block" class="components-button block-editor-inserter__toggle is-next-40px-default-size has-icon">…</button>
  - attempting click action
    - waiting for element to be visible, enabled and stable
  - element was detached from the DOM, retrying

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/inserting-blocks.spec.js:557:5
should change the indented list type in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
TimeoutError: locator.click: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('role=toolbar[name="Block tools"i]').locator('role=button[name="Indent"]')

    at Editor.clickBlockToolbarButton (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/editor/click-block-toolbar-button.ts:17:15)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:727:3
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.
should indent and outdent a list item when its content is fully selected in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 5
+ Received  + 1

  <!-- wp:list -->
  <ul class="wp-block-list"><!-- wp:list-item -->
- <li>a<!-- wp:list -->
- <ul class="wp-block-list"><!-- wp:list-item -->
- <li>b</li>
- <!-- /wp:list-item --></ul>
- <!-- /wp:list --></li>
+ <li></li>
  <!-- /wp:list-item --></ul>
  <!-- /wp:list -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:819:52
should indent and outdent level 1 in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
TimeoutError: locator.click: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('role=toolbar[name="Block tools"i]').locator('role=button[name="Indent"]')

    at Editor.clickBlockToolbarButton (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/editor/click-block-toolbar-button.ts:17:15)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:775:3
should insert a line break on shift+enter in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 1
+ Received  + 1

  <!-- wp:list -->
  <ul class="wp-block-list"><!-- wp:list-item -->
- <li>a<br></li>
+ <li><br></li>
  <!-- /wp:list-item --></ul>
  <!-- /wp:list -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:1210:52
should leave the rest of the list intact when merging into an empty list item in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 32
+ Received  +  1

- Array [
-   Object {
-     "innerBlocks": Array [
-       Object {
-         "attributes": Object {
-           "content": "1",
-         },
-         "innerBlocks": Array [
-           Object {
-             "innerBlocks": Array [
-               Object {
-                 "attributes": Object {
-                   "content": "a",
-                 },
-                 "name": "core/list-item",
-               },
-               Object {
-                 "attributes": Object {
-                   "content": "b",
-                 },
-                 "name": "core/list-item",
-               },
-             ],
-             "name": "core/list",
-           },
-         ],
-         "name": "core/list-item",
-       },
-     ],
-     "name": "core/list",
-   },
- ]
+ Array []
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:3118:38
should merge a following sibling list into the outermost list with Delete from a nested item (#77245) in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 2
+ Received  + 2

@@ -8,11 +8,11 @@
          "innerBlocks": Array [
            Object {
              "innerBlocks": Array [
                Object {
                  "attributes": Object {
-                   "content": "b‸",
+                   "content": "b",
                  },
                  "name": "core/list-item",
                },
              ],
              "name": "core/list",
@@ -25,11 +25,11 @@
    },
    Object {
      "innerBlocks": Array [
        Object {
          "attributes": Object {
-           "content": "1",
+           "content": "‸1",
          },
          "innerBlocks": Array [
            Object {
              "innerBlocks": Array [
                Object {

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:2854:41
should replace selected non-breaking spaces from the toolbar in /test/e2e/specs/editor/various/rich-text.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 1
+ Received  + 1

  Array [
    Object {
      "attributes": Object {
-       "content": "one two three",
+       "content": "ne two three",
      },
      "name": "core/paragraph",
    },
  ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/rich-text.spec.js:1050:41
should select by dragging into nested block in /test/e2e/specs/editor/various/multi-block-selection.spec.js, passed after 1 failed attempt.
Error: expect(received).toEqual(expected) // deep equality

- Expected  - 2
+ Received  + 1

  Array [
-   1,
-   2,
+   3,
  ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/multi-block-selection.spec.js:568:5
should select by dragging in /test/e2e/specs/editor/various/multi-block-selection.spec.js, passed after 1 failed attempt.
Error: expect(received).toEqual(expected) // deep equality

- Expected  - 1
+ Received  + 0

  Array [
-   1,
    2,
  ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/multi-block-selection.spec.js:532:5
should select with shift + click in /test/e2e/specs/editor/various/multi-block-selection.spec.js, passed after 1 failed attempt.
Error: expect(received).toEqual(expected) // deep equality

- Expected  - 1
+ Received  + 0

  Array [
-   1,
    2,
  ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/multi-block-selection.spec.js:380:5
should update the URL from the last navigation if only varies in the URL fragment in /test/e2e/specs/interactivity/router-navigate.spec.ts, passed after 1 failed attempt.
Error: expect(locator).toHaveText(expected) failed

Locator:  getByTestId('title')
Expected: "Link 1"
Received: "Main"
Timeout:  5000ms

Truncated. See the full report.

1b71bf8 Run

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

Tested this in Playground against trunk — the narrower popup is a great improvement and no longer covers the note content, and the single-Escape dismiss works cleanly!

Before (trunk) After PR
Before - trunk wide menu After - compact menu

One quick visual observation:
Because Menu.CheckboxItem reserves space on the inline-start for the selection checkmark (.item-selection-indicator), unchecked emojis have a noticeable gap on the left and appear slightly off-center. Was keeping this indicator track intentional to preserve space for the checkmark, or is there room to center the emojis / tighten that start offset?

@Mamaduka

Copy link
Copy Markdown
Member Author

Was keeping this indicator track intentional to preserve space for the checkmark

Not intentional; just a side effect. This is proof of concept PR.

Comment on lines +260 to +279
<Menu.CheckboxItem
checked={
!! reactions?.[ hexKey ]
?.current_user_reaction
}
onCheckedChange={ () =>
toggleReaction( hexKey )
}
closeOnClick
aria-label={ label }
>
<Menu.ItemLabel>
<span
aria-hidden="true"
className="editor-collab-sidebar-panel__reaction-option-emoji"
>
{ emoji }
</span>
</Menu.ItemLabel>
</Menu.CheckboxItem>

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.

Could we also pass label={ label } to Menu.CheckboxItem? Moving the name out of the item text breaks letter-key navigation, such as typing c for Celebration, because Base UI doesn't use aria-label for that matching.


// Emoji-only items; the Menu's 160px minimum is sized for text labels.
.editor-collab-sidebar-panel__reaction-picker {
--wp-ui-menu-min-width: 0;

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.

This is technically not wrong, although I'm not sure if we'd prefer a straighwidth override instead (we're having mixed feelings about treating those CSS variables as public APIs, cc @mirka )

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.

Actually I was under the impression that we'd be using Base UI Menu directly here, not go through wp-ui. Was that too much?

@Mamaduka Mamaduka Oct 27, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I can prototype it as well. Here are the cons of that approach, in my opinion:

  • Need to reapply styles based on our system and keep them in sync when possible.
  • Sets a precedent we might want to avoid.

Is it okay for packages to use Base UI directly, or do we have to wait for wp-ui?

@mirka mirka Oct 27, 2026 •

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.

It's unclear whether a checkmark is really the appropriate design here, and in a recent chat @jameskoster @jasmussen @fcoveram had expressed a desire to override the item background colors as a custom case for emoji pickers. That's why I had in my mind that this would be a pretty custom implementation using Base UI directly. I might be underestimating the effort, but that was my impression 😄

Is it okay for packages to use Base UI directly

Not in the general case, but I think we have an agreement that emoji pickers are a special case. (With the possibility of it escalating to a proper component if there are more use cases.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Got it. I’ll try to prototype something tomorrow. Would be easier to discuss there.

@adamsilverstein

Copy link
Copy Markdown
Member

I like the direction here, removing the emoji names is helpful. I'll give this a test!

ps. for screenshots it would be nice to see the tooltip in action, as well as what a selected emoji looks like in the menu (eg. an emoji i've already added).

@adamsilverstein

Copy link
Copy Markdown
Member

Screencast testing:

screencast.2026-10-27.08-24-57.mp4

I don't really like the checkmarks for the selected state, previously I believe we were highlighting the emoji themselves with a darker background color.

@Mamaduka

Copy link
Copy Markdown
Member Author

I don't really like the checkmarks for the selected state, previously I believe we were highlighting the emoji themselves with a darker background color

Nothing has changed in that regard; the version on trunk also uses checkmarks, that how menu handles checked state.

@Mamaduka

Copy link
Copy Markdown
Member Author

Closing in favor of #85819.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Notes Phase 3 of the Gutenberg roadmap around block commenting [Package] Editor /packages/editor [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants