From 72c42c289a734dee36992a59b75162d5da975165 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Wed, 28 Jan 2026 12:52:12 -0600 Subject: [PATCH] feat(library): make artist links navigable in local library album view - Artist name in album header now clickable (except for Various Artists) - Clicking artist navigates to Artists tab, scrolls to artist card, and shows their albums - Track artist links (when different from album artist) work the same - Added IDs to artist cards for scroll targeting - Navigation history updated so back button returns to album view --- .../components/views/LocalLibraryView.svelte | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/lib/components/views/LocalLibraryView.svelte b/src/lib/components/views/LocalLibraryView.svelte index ff2934a0f..a1a0524d9 100644 --- a/src/lib/components/views/LocalLibraryView.svelte +++ b/src/lib/components/views/LocalLibraryView.svelte @@ -2215,8 +2215,27 @@ function handleLocalArtistClick(name?: string) { if (!name) return; if (normalizeArtistName(name) === 'various artists') return; + + // Close album detail view if open and navigate to library + if (selectedAlbum) { + clearLocalAlbum(); + navigateTo('library'); // This adds to history so back button works + } + + // Switch to artists tab + activeTab = 'artists'; + // Select artist to show their albums in the right column selectedArtistName = name; + + // Scroll to the artist card after DOM updates + tick().then(() => { + const artistId = `local-artist-${normalizeArtistName(name)}`; + const artistCard = document.getElementById(artistId); + if (artistCard) { + artistCard.scrollIntoView({ behavior: 'smooth', block: 'center' }); + } + }); } /** @@ -2568,7 +2587,7 @@

{selectedAlbum.title}

- {#if onQobuzArtistClick} + {#if normalizeArtistName(selectedAlbum.artist) !== 'various artists'} @@ -3254,6 +3273,7 @@ {@const displayName = getArtistDisplayName(artist.name)} {@const artistImage = artistImages.get(artist.name)}