fix(badges): remove transition from initial loader to fix double-DOM bounce
transition:fade on the initial spinner caused Svelte to keep the outgoing element in the DOM for the full 200ms outro while the incoming badge list was already rendered — both were live simultaneously, colliding on height and producing the visible bounce. Initial cold-start load doesn't need a transition; instant swap is fine. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { untrack } from 'svelte';
|
||||
import { slide, fade } from 'svelte/transition';
|
||||
import { slide } from 'svelte/transition';
|
||||
interface Props {
|
||||
/** @type {import('./$types').PageData} */
|
||||
data: any;
|
||||
@@ -594,7 +594,6 @@ async function handle_search_refresh(params: any) {
|
||||
|
||||
{#if $events_sess?.badges?.search_status === 'loading' && event_badge_id_li.length === 0}
|
||||
<div
|
||||
transition:fade={{ duration: 200 }}
|
||||
class="flex w-full flex-col items-center justify-center p-16 text-center opacity-50">
|
||||
<LoaderCircle size="3em" class="mx-auto mb-2 animate-spin" />
|
||||
<p class="text-xl">Loading badges...</p>
|
||||
|
||||
Reference in New Issue
Block a user