From 87e4b7c356495ebe5203411896b02b9b92a4e816 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Fri, 23 Jan 2026 18:13:00 -0600 Subject: [PATCH] style(artist): add floating text animation to radio loading Step 2 of radio button animation: - Add wrapper for positioning context - Floating messages appear above button and fade upward - Uses Svelte #key directive to re-trigger animation on message change - Absolute positioning ensures no layout shift --- .../components/views/ArtistDetailView.svelte | 65 +++++++++++++------ 1 file changed, 46 insertions(+), 19 deletions(-) diff --git a/src/lib/components/views/ArtistDetailView.svelte b/src/lib/components/views/ArtistDetailView.svelte index 52807a908..0c954d430 100644 --- a/src/lib/components/views/ArtistDetailView.svelte +++ b/src/lib/components/views/ArtistDetailView.svelte @@ -855,20 +855,23 @@ {/if} - + {#if isRadioLoading && radioLoadingMessage} + {#key radioLoadingMessage} + {radioLoadingMessage} + {/key} {/if} - + @@ -1607,18 +1610,42 @@ cursor: not-allowed; } - .loading-message { - display: none; + .radio-btn-wrapper { + position: relative; } - @keyframes fadeIn { - from { + .floating-message { + position: absolute; + left: 50%; + bottom: 100%; + transform: translateX(-50%); + white-space: nowrap; + font-size: 11px; + font-weight: 500; + color: var(--text-muted); + padding: 4px 10px; + background: var(--bg-tertiary); + border-radius: 12px; + pointer-events: none; + animation: floatUp 2s ease-out forwards; + } + + @keyframes floatUp { + 0% { opacity: 0; - transform: translateY(-2px); + transform: translateX(-50%) translateY(8px); } - to { + 15% { opacity: 1; - transform: translateY(0); + transform: translateX(-50%) translateY(0); + } + 70% { + opacity: 1; + transform: translateX(-50%) translateY(-10px); + } + 100% { + opacity: 0; + transform: translateX(-50%) translateY(-20px); } }