Notes Sidebar: Add appearance menu with filtering and density#75982
Notes Sidebar: Add appearance menu with filtering and density#75982
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: +1.69 kB (+0.02%) Total Size: 6.84 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 |
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