Skip to content

Combine sidebar organize and sort menus into one popover - #588

Merged
SawyerHood merged 2 commits into
mainfrom
bb/combine-sort-and-grouping-thr_63rk6pp9c9
Jul 9, 2026
Merged

SawyerHood merged 2 commits into
mainfrom
bb/combine-sort-and-grouping-thr_63rk6pp9c9

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the sidebar's two separate icon menus — Layers ("Organize by") and ArrowUpDown ("Sort") — with a single display-options popover behind one SlidersHorizontal trigger.
  • The popover holds an Organize by segmented control (Projects / Manual, renamed from "Manually") above the existing Sort by options (Updated at / Created at / Alphabetical, unchanged direction semantics).
  • The menu stays open across selections — on desktop and the mobile sheet — closing only on outside click or Escape.
  • The combined menu also renders on the Threads header, so in manual mode it appears above both the Folders and Threads sections; sort remains enabled in both modes.

Flicker/stability handling

Toggling the organization mode swaps the sidebar's section tree, remounting the open menu on the other header. Two mitigations keep that seamless:

  • Suppress the popover's replayed entrance animation when it mounts already open.
  • Pin the popover to its previous on-screen position (recording the effective anchor so repeated toggles don't drift) until it closes, so it doesn't move out from under the pointer. The next open anchors normally.

Tests

  • pnpm exec turbo run typecheck --filter=@bb/app --filter=@bb/shared-ui ✅
  • vitest run src/components/sidebar/ — 13 files, 97 tests ✅ (menu tests rewritten for the combined popover, incl. stays-open assertions)
  • Verified live in the dev app via browser automation: popover holds its exact position and stays open across repeated Projects ↔ Manual toggles, and re-anchors naturally on a fresh open.

🤖 Generated with Claude Code

SawyerHood and others added 2 commits July 9, 2026 16:16
Replace the separate Layers (organize) and ArrowUpDown (sort) icon menus
with a single display-options popover behind one SlidersHorizontal
trigger. The popover holds an "Organize by" segmented control
(Projects / Manual) above the existing sort options, stays open across
selections (closing only on outside click or Escape), and renders on the
Threads header too, so in manual mode it is available above both the
Folders and Threads sections.

When the organization mode flips, the sidebar's section tree swaps and
the open menu remounts on the other header. Suppress the replayed
entrance animation and pin the popover to its previous on-screen spot
until it closes, so it neither flashes nor moves out from under the
pointer mid-interaction.

Co-Authored-By: Claude Fable 5 <[email protected]>
@SawyerHood
SawyerHood merged commit 1912e20 into main Jul 9, 2026
10 checks passed
@SawyerHood
SawyerHood deleted the bb/combine-sort-and-grouping-thr_63rk6pp9c9 branch July 9, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant