forked from Keelrleek/SoulStream
search: the results page, the typeahead, and a session that survives a reload
The page is the signed-off prototype built out: floating rounded hero, inline top-tracks panel, filter chips, two-column Songs|Albums beside Artists, and all seven states — results, searching, no results, one-kind-only, library-empty, provider-unreachable, first visit. MusicBrainz records are merged in silently behind the Deezer rows. The top result is ranked by POPULARITY, not by kind: each kind puts up its most popular exact match and the winner is whichever holds the largest share of its own kind's leader. A raw fans-vs-rank comparison was tried first and handed "panda bear" to an Owl City song. Two provenance traps are paid for here. Deezer's /search/album returns no release_date at all, so sorting newest-first ordered by PROVENANCE rather than by date; dates are backfilled from the artist overview, resolved PER ALBUM ARTIST because Deezer's artist search answers nothing for "weezer blue album". And the typeahead holds its keyboard selection as the row's KEY rather than its index, because the MusicBrainz supplement lands ~600ms later and re-orders the album group under the cursor. The hero's middle third is hidden on the width of the PANE, not the window. The sidebar and the now-playing rail take ~490px between them, so a 1504px window can leave the hero 1012px — a window-width media query cannot see that, and the "latest release" card ended up sheared down to 26px of itself. The budget is written out at the @container rule. Session restore rounds it off: reload or restart returns to the same place with the same track, everything but the transport coming from localStorage. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7547fed56d
commit
b173f60085
6 files changed
+3315
-493
No files matched your search
@@ -26,6 +26,7 @@
|
||||
refreshLibrary,
|
||||
refreshPlaylists,
|
||||
refreshRecents,
|
||||
restoreSession,
|
||||
} from "./lib/state.svelte.js";
|
||||
import { floatScroll } from "./lib/scrollbar.js";
|
||||
|
||||
@@ -60,6 +61,10 @@
|
||||
refreshLibrary();
|
||||
refreshPlaylists();
|
||||
refreshRecents();
|
||||
// Last, and after initEvents: the restore asks the audio thread what it is
|
||||
// doing, and re-opens the page the last session was on. See the session
|
||||
// section at the foot of state.svelte.js.
|
||||
void restoreSession();
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user