feat: skeleton loading state on the home catalog
Replaces the plain "Loading…" text with a content-shaped MangaGridSkeleton so the catalog grid's layout is reserved while it loads and swaps in without a shift. Keeps the data-testid="loading" wrapper (now role="status") for accessibility and selector stability. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
import ContinueReadingShelf from '$lib/components/ContinueReadingShelf.svelte';
|
||||
import RecommendationShelf from '$lib/components/RecommendationShelf.svelte';
|
||||
import MangaCard from '$lib/components/MangaCard.svelte';
|
||||
import MangaGridSkeleton from '$lib/components/MangaGridSkeleton.svelte';
|
||||
import Pager from '$lib/components/Pager.svelte';
|
||||
import SegmentedControl from '$lib/components/SegmentedControl.svelte';
|
||||
import Sheet from '$lib/components/Sheet.svelte';
|
||||
@@ -659,7 +660,9 @@
|
||||
</Sheet>
|
||||
|
||||
{#if loading}
|
||||
<p class="status" data-testid="loading">Loading…</p>
|
||||
<div data-testid="loading" role="status" aria-label="Loading manga">
|
||||
<MangaGridSkeleton />
|
||||
</div>
|
||||
{:else if error}
|
||||
<p class="error" data-testid="error" role="alert">{error}</p>
|
||||
{:else if mangas.length === 0}
|
||||
|
||||
Reference in New Issue
Block a user