Skip to content

Notes: Add keyboard shortcuts for the display modes - #82973

Closed
adamsilverstein wants to merge 7 commits into
add/notes-visibility-togglefrom
add/notes-display-mode-shortcuts
Closed

adamsilverstein wants to merge 7 commits into
add/notes-visibility-togglefrom
add/notes-display-mode-shortcuts

Conversation

@adamsilverstein

@adamsilverstein adamsilverstein commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow up to #76024 and stacked on its branch, so the diff here includes the display modes until that PR lands.

Adds keyboard equivalents for the three choices in the Notes submenu of the Options menu: access+E expands notes, access+I minimizes them and access+J hides them (access is Ctrl+Option on macOS and Shift+Alt elsewhere). Each choice in the submenu advertises its combination, and the shortcuts register in the global category so they show up in the Keyboard shortcuts help modal.

@Mamaduka suggested splitting these out of #76024 so the combinations can be discussed on their own without holding up the display modes, see #76024 (comment). The useSelect mapping flagged in the same review is reworked here as well: each choice selects its own memoized shortcut instead of mapping all three into one object.

Question: are access+E, access+I and access+J the right combinations? access combos are less likely to collide with native browser shortcuts than primary ones, but nothing here is set in stone. Command palette integration could be a follow up once these settle.

Test plan

Test in WP Playground

  1. Open a post and add notes to a couple of blocks (https://github.com/t-hamano/notes-data-generator helps).
  2. Press access+I: the floating notes collapse to avatar pills.
  3. Press access+J: the notes hide and the reserved canvas space is released.
  4. Press access+E: the full floating notes come back.
  5. Open the Options (ellipsis) menu and the Notes submenu: each choice shows its shortcut next to the label.
  6. Press access+H to open the Keyboard shortcuts modal and confirm the three entries in the Global shortcuts section.
  7. Hide the notes and add a new note from the block toolbar: the notes come back into view.

AI Use

Claude Code drafted the code and this description, I steered. I will review and test.

🤖 Generated with Claude Code

https://claude.ai/code/session_01H22PasvCsxDt17L7sQfa5f

adamsilverstein and others added 2 commits September 15, 2026 09:09
Reinstates the access+E / access+I / access+J shortcuts split out of #76024
so the combinations can be discussed on their own. Each choice in the Notes
submenu advertises its shortcut.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H22PasvCsxDt17L7sQfa5f
Mapping the three shortcuts into one object inside useSelect is the shape
the data package warns about; each choice now selects its own memoized
shortcut directly.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H22PasvCsxDt17L7sQfa5f
@adamsilverstein adamsilverstein added [Type] Enhancement A suggestion for improvement. [Feature] Notes Phase 3 of the Gutenberg roadmap around block commenting labels Sep 15, 2026
@github-actions github-actions Bot added the [Package] Editor /packages/editor label Sep 15, 2026
@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

📦 Bundle size

Size Change: +187 B (0%)

Total Size: 8.22 MB

📦 View Changed
Filename Size Change
build/scripts/editor/index.min.js 613 kB +187 B (+0.03%)

e4f3d3d Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 475e5c0 add/notes-visibility-toggle % Change
timeToFirstByte 44.3 ms +13.21% -3.05% 44.9 ms +12.81% -5.35% -1.34%
largestContentfulPaint 80 ms +2.5% -10% 78 ms +5.13% -7.69% 2.56%
lcpMinusTtfb 29.85 ms +19.1% -6.53% 29.2 ms +20.21% -7.71% 2.23%
wpBeforeTemplate 22.14 ms +17.07% -3.34% 23.24 ms +13.34% -8.73% -4.73%
wpTemplate 18.87 ms +4.98% -4.08% 19.02 ms +6.2% -5.47% -0.79%
wpTotal 41.04 ms +13.86% -3.07% 41.74 ms +12.99% -5.77% -1.68%
wpMemoryUsage 7.61 MB +0% -0% 7.60 MB +0% -0% 0.15%
wpDbQueries 17 +0% -0% 17 +0% -0% 0%

front-end-classic-theme

Metric 475e5c0 add/notes-visibility-toggle % Change
timeToFirstByte 32.2 ms +7.45% -2.02% 35.25 ms +8.79% -1.56% -8.65%
largestContentfulPaint 72 ms +5.56% -0% 80 ms +5% -5% -10%
lcpMinusTtfb 40.05 ms +1.75% -2.12% 44.1 ms +2.72% -5.67% -9.18%
wpBeforeTemplate 19.04 ms +8.25% -1.21% 18.76 ms +6.08% -0.85% 1.49%
wpTemplate 10.49 ms +4.19% -0.95% 13.65 ms +4.76% -1.17% -23.15%
wpTotal 29.66 ms +8.56% -1.65% 32.56 ms +9.61% -1.29% -8.91%
wpMemoryUsage 6.09 MB +0% -0% 6.22 MB +0% -0% -2.08%
wpDbQueries 10 +0% -0% 14 +0% -0% -28.57%

media-processing

Metric 475e5c0 add/notes-visibility-toggle % Change
mediaProcessingJpeg 321.04 ms +0.79% -1.11% 319.42 ms +2.12% -0.81% 0.51%
mediaProcessingAvif 4842.7 ms +0.11% -0.31% 4812.07 ms +0.27% -0.11% 0.64%
mediaProcessingJpegToAvif 3361.12 ms +0.62% -0.37% 3339.88 ms +0.28% -0.07% 0.64%

media-upload

Metric 475e5c0 add/notes-visibility-toggle % Change
jpegUploadProcessing 1417.77 ms +0.75% -1.42% 1402.01 ms +0.13% -0.62% 1.12%
pngUploadProcessing 178.8 ms +0.68% -2.66% 194.48 ms +47.45% -6.66% -8.06%
largeJpegUploadProcessing 1392.57 ms +1.35% -1.34% 1388.69 ms +1.29% -0.9% 0.28%
multipleImageUploadProcessing 1504.4 ms +0.83% -2.14% 1456.81 ms +0.38% -1.28% 3.27%

post-editor

Metric 475e5c0 add/notes-visibility-toggle % Change
serverResponse 416.3 ms +2.46% -4.75% 425.61 ms +2.32% -6.89% -2.19%
firstPaint 227.65 ms +8.97% -17.71% 209.34 ms +10.73% -10.57% 8.75%
domContentLoaded 995.28 ms +2.83% -2.4% 1017.99 ms +0.36% -2.76% -2.23%
loaded 996.58 ms +2.81% -2.39% 1019.3 ms +0.35% -2.75% -2.23%
firstContentfulPaint 415.53 ms +6.52% -3.08% 428 ms +2.49% -3.96% -2.91%
firstBlock 2875.95 ms +1.72% -1.23% 2907.77 ms +1.3% -1.22% -1.09%
type 18.09 ms +4.04% -2.16% 18.82 ms +9.25% -2.66% -3.88%
typeWithoutInspector 17.8 ms +4.33% -2.3% 17.68 ms +4.36% -3.11% 0.68%
typeWithTopToolbar 23.31 ms +2.49% -2.53% 23.39 ms +5.39% -3.55% -0.34%
typeContainer 8.98 ms +2.56% -6.35% 8.68 ms +11.18% -5.07% 3.46%
focus 70.9 ms +9.8% -5.4% 72.11 ms +9.18% -5.64% -1.68%
firstFocus 187.94 ms +0% -0% 215.16 ms +0% -0% -12.65%
selectAll 400.14 ms +3.35% -3.72% 416.93 ms +0.66% -6.38% -4.03%
listViewOpen 58.2 ms +1.29% -6.44% 61.65 ms +7.72% -9.93% -5.6%
inserterOpen 22.38 ms +19.97% -6.26% 24.65 ms +9.05% -12.29% -9.21%
inserterHover 2.27 ms +9.25% -11.01% 2 ms +7% -5.5% 13.5%
inserterSearch 7.7 ms +13.12% -5.06% 8.27 ms +5.2% -4.59% -6.89%
loadPatterns 659.64 ms +2.52% -4.8% 616.02 ms +1.36% -3.82% 7.08%
wpTotal 406.11 ms +2.49% -4.91% 415.41 ms +2.05% -6.95% -2.24%
wpMemoryUsage 13.14 MB +0% -0% 13.14 MB +0% -0% 0.05%
wpDbQueries 54 +0% -0% 54 +0% -0% 0%

site-editor

Metric 475e5c0 add/notes-visibility-toggle % Change
serverResponse 379.33 ms +7.29% -7.09% 377.79 ms +10.19% -4.02% 0.41%
firstPaint 234.63 ms +9.93% -10.13% 232.82 ms +3.01% -14.97% 0.78%
domContentLoaded 1127.54 ms +0.65% -1.56% 1108.81 ms +2.71% -1.27% 1.69%
loaded 1128.78 ms +0.64% -1.56% 1109.97 ms +2.71% -1.28% 1.69%
firstContentfulPaint 445.03 ms +3.94% -2.86% 456.28 ms +1.09% -3.14% -2.47%
firstBlock 3970.55 ms +0.97% -1.05% 3931.42 ms +0.42% -0.59% 1%
type 18.5 ms +6.59% -4.86% 18.3 ms +4.26% -4.7% 1.09%
navigate 107.55 ms +11.27% -4.43% 94.83 ms +13.65% -1.77% 13.41%
loadPatterns 1299.3 ms +16.79% -7.94% 1209.65 ms +0.96% -2.14% 7.41%
loadPages 1079.24 ms +0.96% -0.77% 1091.27 ms +1.28% -0.9% -1.1%
wpTotal 368.24 ms +7.67% -7.17% 367.23 ms +10.51% -4.16% 0.28%
wpMemoryUsage 12.11 MB +0% -0% 12.10 MB +0% -0% 0.06%
wpDbQueries 43.5 +1.15% -1.15% 43.5 +1.15% -1.15% 0%

e4f3d3d Run

🏁 Flaky tests

Show the failures

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 navigate inner blocks with arrow keys in /test/e2e/specs/editor/various/writing-flow.spec.js, passed after 1 failed attempt.
TimeoutError: locator.click: Timeout 10000ms exceeded.
Call log:
  - waiting for getByRole('listbox', { name: 'Blocks' }).getByRole('option', { name: 'Paragraph' })

    at WritingFlowUtils.addDemoContent (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/writing-flow.spec.js:1594:5)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/writing-flow.spec.js:30:3

e4f3d3d Run

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

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

@adamsilverstein

Copy link
Copy Markdown
Member Author

Closing note, drafted by Claude:

Closing along with #79864 and #76024 in favor of #83768 and #83786. The display mode shortcuts will come back as a follow-up built on the notesDisplayMode preference.

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.

1 participant