From 222be5e9a505cb27f32052637a4cc4c64cfa7770 Mon Sep 17 00:00:00 2001 From: Luke Stebner Date: Wed, 8 Jul 2026 09:13:05 -0700 Subject: [PATCH 1/4] feat: add now-playing drawer for quick track list access MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clicking the now-playing bar's album art previously navigated the main view away from whatever was being browsed. It now slides in a 420px drawer showing the playing album's metadata and track list instead, leaving the main view untouched — this also sets up a home for future playlist queues, which won't have an albumId to navigate to. Co-Authored-By: Claude Sonnet 5 --- .../nowplaying/NowPlayingDrawer.svelte | 330 ++++++++++++++++++ .../components/transport/TransportBar.svelte | 11 +- src/lib/stores/library.svelte.ts | 13 - src/lib/stores/ui.svelte.ts | 10 + src/routes/+layout.svelte | 2 + 5 files changed, 348 insertions(+), 18 deletions(-) create mode 100644 src/lib/components/nowplaying/NowPlayingDrawer.svelte diff --git a/src/lib/components/nowplaying/NowPlayingDrawer.svelte b/src/lib/components/nowplaying/NowPlayingDrawer.svelte new file mode 100644 index 0000000..b4824cc --- /dev/null +++ b/src/lib/components/nowplaying/NowPlayingDrawer.svelte @@ -0,0 +1,330 @@ + + + + +{#if ui.nowPlayingDrawerOpen} + + +{/if} + + diff --git a/src/lib/components/transport/TransportBar.svelte b/src/lib/components/transport/TransportBar.svelte index da0f13a..e09a1fc 100644 --- a/src/lib/components/transport/TransportBar.svelte +++ b/src/lib/components/transport/TransportBar.svelte @@ -3,20 +3,21 @@ import { Pause, Play, SkipBack, SkipForward, Volume2 } from "@lucide/svelte"; import { library } from "$lib/stores/library.svelte"; import { player } from "$lib/stores/player.svelte"; + import { ui } from "$lib/stores/ui.svelte"; import { formatDuration } from "$lib/format"; import StarRating from "$lib/components/rating/StarRating.svelte"; import Equalizer from "$lib/components/transport/Equalizer.svelte"; // Looked up from the complete unfiltered list (not the artist-filtered // `albums`) since playback can be on an album outside whatever's - // currently browsed — same reasoning as goToAlbum below. + // currently browsed — same reasoning the now-playing drawer uses. const currentAlbum = $derived( library.allAlbums.find((a) => a.id === player.snapshot.album_id) ?? null, ); - function goToCurrentAlbum() { + function openNowPlayingDrawer() { if (player.snapshot.album_id !== null) { - library.goToAlbum(player.snapshot.album_id); + ui.openNowPlayingDrawer(); } } @@ -42,9 +43,9 @@
+ + diff --git a/src/lib/components/nowplaying/NowPlayingDrawer.svelte b/src/lib/components/nowplaying/NowPlayingDrawer.svelte index b4824cc..a847e46 100644 --- a/src/lib/components/nowplaying/NowPlayingDrawer.svelte +++ b/src/lib/components/nowplaying/NowPlayingDrawer.svelte @@ -1,44 +1,84 @@