Desktop: make the sidebar's Playlists entry expandable, and a drop target #20

Open
opened 2026-08-18 05:54:00 +00:00 by logan · 0 comments
Collaborator

Report

The Playlists item in the sidebar should expand to list my playlists, for quick access — and I should be able to drag tracks/albums onto a playlist name there to add them to it.

Findings

  • frontend/src/components/sidebar/app-sidebar.ts has a flat item list (~lines 199-209); no nesting.
  • playlist-store is deliberately lazy: playlist-view is its only reader and is created lazily, so neither the invalidation nor the singleton's construction warms a cache for a page that may never open. An always-mounted sidebar list changes that — the sidebar becomes a permanent subscriber.
  • PlaylistTracksChanged already carries the playlist id and patches in place, so the cost of subscribing is bounded.
  • The sidebar collapses to icon mode below 900px and is reused inside the mobile drawer — the expanded list has to behave in both.

Direction

A disclosure on the Playlists row (aria-expanded/aria-controls, body rendered and hidden-toggled — see config-section's pattern) plus drop handling per playlist row reusing the existing drag payload. Decide explicitly whether the sidebar warming playlist-store at startup is acceptable, or whether the list should load on first expand.

**Report** The Playlists item in the sidebar should expand to list my playlists, for quick access — and I should be able to drag tracks/albums onto a playlist name there to add them to it. **Findings** - `frontend/src/components/sidebar/app-sidebar.ts` has a flat item list (~lines 199-209); no nesting. - `playlist-store` is deliberately lazy: `playlist-view` is its only reader and is created lazily, so neither the invalidation nor the singleton's construction warms a cache for a page that may never open. An always-mounted sidebar list changes that — the sidebar becomes a permanent subscriber. - `PlaylistTracksChanged` already carries the playlist id and patches in place, so the cost of subscribing is bounded. - The sidebar collapses to icon mode below 900px and is reused inside the mobile drawer — the expanded list has to behave in both. **Direction** A disclosure on the Playlists row (`aria-expanded`/`aria-controls`, body rendered and `hidden`-toggled — see `config-section`'s pattern) plus drop handling per playlist row reusing the existing drag payload. Decide explicitly whether the sidebar warming `playlist-store` at startup is acceptable, or whether the list should load on first expand.
logan added the Area/Shell-NavKind/FeaturePlatform/Desktop
Priority
Medium
3
labels 2026-08-18 14:36:07 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yonlu/yellowjacket#20