Repository navigation
Add Expand, Minimize and Hide Notes modes to the Options (ellipsis) menu - #79965
Conversation
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @justinemshields. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +397 B (+0.01%) Total Size: 7.75 MB 📦 View Changed
|
Add 'Expand notes' and 'Minimize notes' choices to the Notes toolbar dropdown introduced by #76024. When minimized, floating note threads collapse to an avatar pill anchored to the canvas edge; hovering or focusing a pill reveals the author name and time, and selecting the thread expands it fully. The hover reveal is CSS-only (:hover/:focus-within), so no extra React state is needed, and the floating board's ResizeObserver handles reflow when threads collapse or expand.
The DropdownMenu popover stayed open after selecting a choice, so a subsequent click on the toolbar toggle closed the menu instead of reopening it. Pass onClose through and call it on selection.
34e662f to
ba2b8f2
Compare
|
Flaky tests detected in c870d33. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/29806905980
|
Reorder the display options from least to most visible (Hide, Minimize, Expand, Show all), rename Show notes to Expand notes, and separate Show all notes into its own menu group so a divider precedes it. This mirrors the comment display menu in Google Docs, which the feature is modeled on. Register keyboard shortcuts for each mode using WordPress conventions (access modifier) rather than Docs' exact chords to avoid conflicts, and surface the shortcut on each menu item. The four handlers share an applyNotesDisplayMode helper with the dropdown. Update the e2e assertions for the new order and label.
|
Addressed in 6d1cbf4:
|
|
Just a note that what blocked my PR on this last time was feedback that the dropdown menu isn't necessarily the right path forward and that folks wanted to see a resizable sidebar. We need to align with design here as that's where I got stuck. I'm not a design but I obviously am biased towards liking this approach haha. @WordPress/gutenberg-design for more feedback here, although I imagine not much has changed since this is quite close UX wise to the original PR (this PR is better code wise!). |
# Conflicts: # packages/editor/src/components/collab-sidebar/index.js # test/e2e/specs/editor/various/block-notes.spec.js
The Options-menu items carry keyboard shortcut text in their accessible names, so an exact name match no longer finds them.
|
Synced with the base branch and applied jasmussen's feedback from #79971 (comment): the Hide / Minimize / Expand choices (with their keyboard shortcuts) now live in a "Notes" group in the editor's Options (ellipsis) menu instead of a dropdown on the pinned notes button, which is a plain "All notes" sidebar toggle again. The show-all keyboard shortcut still works. e2e updated; block-notes + collaboration suites (45 tests) pass locally. |
|
Fantastic! Thank you for taking this over. |
Match the menu order from the design review, most visible mode first.
|
This is the major change:
In principle I'm for it, as a simple way to start that lets us keep the notes button a toggle. But it will very much benefit the feature to migrate to Menu with submenus, so it doesn't become so long as to scroll on mobile. That's not a blocker, but let's probably note it as a followup for someone to tackle. That would also let us use the radio grouping mechanism instead of the checkbox indication for the item-exclusive options. One thing for this branch: can you move the Notes group under "Panels"? This is mostly a hierarchy thing. The choice is not that important. |
…ture Port the Minimize notes mode onto the floating-notes-in-canvas-margin implementation from #79864, matching the combined test branch (#79971) byte for byte: - Minimized threads collapse to an avatar pill that reveals the author name and time on hover or focus; selecting a pill expands the thread. - The reserved canvas width follows the presentation: 280px for full threads, 82px for pills, and the boundary divider scales with it. - The panel also yields progressively as the canvas narrows: full threads collapse to pills below 880px and the pills release their reserved space below 482px.
Rebuilds the Minimize notes mode on the canvas-margin floating notes architecture from #79864, replacing the FLOATING_NOTES_SIDEBAR-based implementation (previous head 63a217b). The four experimental notes keyboard shortcuts from the previous implementation are not carried over; they can return as a follow-up if still wanted.
|
Rebuilt on the canvas-margin architecture; see the updated description. This PR now also carries the variable reserved width (280px full / 82px pills) and the responsive collapse tiers validated on #79971. |
|
This branch seems to have picked up irrelevant commits, probably due to a rebase issue. |
Trunk renamed the pending note form class from editor-collab-sidebar-panel__thread to editor-collab-sidebar-panel__add-note, so the overlay's pointer-events carve-out no longer matched it and clicks fell through to the canvas iframe.
Tests added on trunk after this branch forked still located notes inside the docked Editor settings region; with the floating overlay they live in the Notes region. Also park the pointer before asserting the un-highlight on focus-out, since hovering a floating thread highlights its block.
|
@adamsilverstein, could you resolve the rebase issues so that we can review this PR? |
Oops, fixing. |
Fixed and enabled the gh-stack feature, https://github.github.com/gh-stack/ |
# Conflicts: # test/e2e/specs/editor/various/block-notes.spec.js
|
Closing this in favor of #76024, which has been fast-forwarded to this branch'stip ( |


Summary
Closes #73417
Adds a Minimize notes choice to the Notes group in the editor's Options (ellipsis) menu, introduced in #76024. Rebuilt on the canvas-margin floating notes architecture from #79864, and byte-identical to the implementation validated on the combined test branch #79971.
When minimized, floating note threads collapse to a small avatar pill anchored at the canvas edge:
:hover/:focus-within).Variable reserved width
The space reserved inside the canvas now follows the presentation: 280px for full threads, 82px for minimized pills, and the boundary divider from #79864 scales with the active width. The panel also adapts automatically to the canvas width (the canvas is freely resizable): full threads collapse to pills below a 880px canvas, and the pills release their reserved space entirely below 482px, keeping a readable content column at every size. The e2e spec covers the Options-menu switching and the responsive collapse tiers.
The previous implementation (built on the retired
FLOATING_NOTES_SIDEBARplumbing) remains in history at 63a217b. Its four experimental notes keyboard shortcuts (access+j/i/e/a) are not carried over; they can return as a follow-up if still wanted.Test plan
Screencast
export-1783962513403.mp4
Screenshot