From 28ab39a9051fa58ca0aa4bd1326785e29ece382f Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Wed, 28 Jan 2026 12:59:27 -0600 Subject: [PATCH] fix(library): fix artist view height and scroll timing - Adjusted artist two-column layout height to account for NowPlayingBar (was calc(100vh - 320px), now calc(100vh - 424px)) - Added 100ms delay before scrolling to artist card to ensure content is fully rendered after tab switch --- src/lib/components/views/LocalLibraryView.svelte | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/lib/components/views/LocalLibraryView.svelte b/src/lib/components/views/LocalLibraryView.svelte index a1a0524d9..477c8f482 100644 --- a/src/lib/components/views/LocalLibraryView.svelte +++ b/src/lib/components/views/LocalLibraryView.svelte @@ -2229,12 +2229,15 @@ selectedArtistName = name; // Scroll to the artist card after DOM updates + // Use multiple ticks + small delay to ensure content is fully rendered tick().then(() => { - const artistId = `local-artist-${normalizeArtistName(name)}`; - const artistCard = document.getElementById(artistId); - if (artistCard) { - artistCard.scrollIntoView({ behavior: 'smooth', block: 'center' }); - } + setTimeout(() => { + const artistId = `local-artist-${normalizeArtistName(name)}`; + const artistCard = document.getElementById(artistId); + if (artistCard) { + artistCard.scrollIntoView({ behavior: 'smooth', block: 'center' }); + } + }, 100); }); } @@ -5793,7 +5796,8 @@ .artist-two-column-layout { display: flex; gap: 24px; - height: calc(100vh - 320px); + /* 320px for header/tabs, 104px for NowPlayingBar */ + height: calc(100vh - 424px); min-height: 400px; }