Repository navigation
Conversation
Add an appearance popover to the "All notes" sidebar header using the Menu component with radio items. Users can filter notes by status (All, Unresolved, Resolved) and toggle display density (Balanced, Compact). Preferences persist via the preferences store. - Add NotesAppearancePopover with Menu.RadioItem groups - Expose resolvedSortedThreads from useBlockComments hook - Read preferences inside Slot/Fill boundary for reliable reactivity - Add compact thread indicator with avatar, name, and relative time - Register notesFilter and notesDensity preference defaults Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
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 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: +737 B (+0.01%) Total Size: 6.87 MB
ℹ️ View Unchanged
|
|
Thanks, @annezazu! I think there are a couple of overlapping ideas, and it would be nice to split them into atomic changes, so that they don't block each other.
tl;dr: I would like us to be more strategic about similar improvements; there's a lot of overlap, and we don't want to overcomplicate these controls. cc @t-hamano |
Remove the Balanced/Compact density toggle from the appearance menu as it wasn't providing value. Switch the notes filter (All/Unresolved/ Resolved) from persisted preferences to local React state so it resets to "All" on each editor session. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Flaky tests detected in 4f697d2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22506057220
|
|
@annezazu can you please refresh this PR with latest trunk to allow more confident testing? Thanks! |
Trunk rewrote the notes sidebar (`comments.js` -> `notes.jsx`, `index.js` -> `index.jsx`, `useBlockComments` -> `useNoteThreads`), so the filter is re-applied on the new structure rather than merged: - The appearance menu moves to the `@wordpress/ui` `Menu` primitives that the sidebar now uses, as `appearance-popover.jsx`. - Filtering is derived in `index.jsx` from the single `notes` list trunk already orders, using the same "approved and still anchored to a block" test that the "Resolved" separator is drawn at, so orphaned notes stay with the active ones under the "Unresolved" filter. - A filter that matches nothing now shows a short message instead of the new-note composer, which would otherwise appear in an empty filtered list. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
🤖 PR meta 🤖📦 Bundle sizeSize Change: +419 B (+0.01%) Total Size: 8.21 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
|
A filtered list is already all one status, so the divider adds nothing: under "Resolved" it appeared as a redundant heading above the first note, and under "Unresolved" it never appeared at all, which read as an inconsistency. It now shows only in the unfiltered "All notes" view, where it still marks the boundary between active and resolved notes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
@draganescu done! Looking good: notes.filtering.movI intentionally removed any heading from appearing, like RESOLVED or UNRESOLVED, but that could be added back. |

Summary
In working on the PR to bring compact notes as an option, I wanted to follow up on @jameskoster suggestion
to add more filtering. Besides compact notes, being able to filter the all notes view feels advantageous.
Menucomponent with radio items@wordpress/preferencesstoreI went with the radio as the form component felt too bulky:
Key implementation details
NotesAppearancePopover: New component usingMenu.RadioItemgroups (private API viaunlock)NotesSidebarContentreadsnotesFilter,CommentsreadsnotesDensity) to ensure reliable reactivityuseBlockCommentshook now exposesresolvedSortedThreadsin addition to existingunresolvedSortedThreadsMenu.Popoverusesmodal={false}to prevent focus trap conflicts with the sidebaronFocus/onBlurhandlers for keyboard accessibility parity with full threadsTest plan
Video walkthrough
PR.for.filtering.mov
🤖 Generated with Claude Code