From 716806865bce3cadc8134dce8c3cddceed09f78a Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Sun, 5 Apr 2026 15:56:55 -0600 Subject: [PATCH] fix(coverflow): larger covers, fix overlap, remove broken animation Center cover bumped from 360px to 460px. Side covers pushed out to 280px/460px offsets (from 180/300) to prevent overlapping the center. Removed broken slideLeft/slideRight keyframe animations that referenced unset --translate-x variable and conflicted with the CSS transitions already on each item. Transitions alone handle all position changes smoothly on click/skip. cc --- .../immersive/panels/CoverflowPanel.svelte | 130 ++++++------------ 1 file changed, 43 insertions(+), 87 deletions(-) diff --git a/src/lib/components/immersive/panels/CoverflowPanel.svelte b/src/lib/components/immersive/panels/CoverflowPanel.svelte index e927d40ae..91ef692ef 100644 --- a/src/lib/components/immersive/panels/CoverflowPanel.svelte +++ b/src/lib/components/immersive/panels/CoverflowPanel.svelte @@ -78,33 +78,6 @@ return items; }); - // Track previous index for animation direction - let previousIndex = $state(-1); - let animationDirection = $state<'left' | 'right' | null>(null); - let animationTimeout: ReturnType | null = null; - - $effect(() => { - if (previousIndex === -1) { - // First run: initialize without animating - previousIndex = queueCurrentIndex; - return; - } - if (queueCurrentIndex !== previousIndex) { - animationDirection = queueCurrentIndex > previousIndex ? 'left' : 'right'; - previousIndex = queueCurrentIndex; - - if (animationTimeout) clearTimeout(animationTimeout); - animationTimeout = setTimeout(() => { - animationDirection = null; - animationTimeout = null; - }, 500); - - return () => { - if (animationTimeout) { clearTimeout(animationTimeout); animationTimeout = null; } - }; - } - }); - function handleCoverClick(index: number) { if (index !== queueCurrentIndex && onNavigate) { onNavigate(index); @@ -113,7 +86,7 @@
-
+
{#each coverflowItems as item (item.index)}