From 921639041c75ee78f9ac858c09f247cdfe4493c8 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Fri, 23 Jan 2026 16:10:43 -0600 Subject: [PATCH] fix(ui): make HomeView loading overlay respect sidebar state Pass sidebarExpanded prop to HomeView to dynamically position the loading overlay based on sidebar width (280px expanded, 64px collapsed). Added smooth transition for left position. --- src/lib/components/views/HomeView.svelte | 10 ++++++---- src/routes/+page.svelte | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/components/views/HomeView.svelte b/src/lib/components/views/HomeView.svelte index 47b395616..a69b7d8c9 100644 --- a/src/lib/components/views/HomeView.svelte +++ b/src/lib/components/views/HomeView.svelte @@ -75,6 +75,7 @@ checkTrackDownloaded?: (trackId: number) => boolean; activeTrackId?: number | null; isPlaybackActive?: boolean; + sidebarExpanded?: boolean; } let { @@ -105,7 +106,8 @@ onTrackReDownload, checkTrackDownloaded, activeTrackId = null, - isPlaybackActive = false + isPlaybackActive = false, + sidebarExpanded = true }: Props = $props(); // Home settings state @@ -589,7 +591,7 @@
{#if isOverlayVisible} -
= totalVisibleSections && totalVisibleSections > 0}> +
= totalVisibleSections && totalVisibleSections > 0} style="left: {sidebarExpanded ? '280px' : '64px'}">
@@ -954,7 +956,7 @@ .loading-overlay { position: fixed; top: 0; - left: var(--sidebar-width, 280px); + /* left is set dynamically via inline style based on sidebar state */ right: 0; bottom: calc(var(--player-bar-height, 104px)); z-index: 10; @@ -962,7 +964,7 @@ display: flex; align-items: center; justify-content: center; - transition: opacity 300ms ease-out; + transition: opacity 300ms ease-out, left 200ms ease; } .loading-overlay.fade-out { diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 60ae5e7ad..a65b8ee06 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -2278,6 +2278,7 @@ checkTrackDownloaded={checkTrackDownloaded} activeTrackId={currentTrack?.id ?? null} isPlaybackActive={isPlaying} + sidebarExpanded={sidebarExpanded} /> {/if} {:else if activeView === 'search'}