New shared primitives: - Toaster + toast-store, ConfirmSheet, Modal, focusTrap action, pullToRefresh action, avatarPalette + initials helper, Skeleton, HeartBurst, haptics, export-status store with onClearAuth hook Critical UX/a11y: - Replaced window.confirm with branded ConfirmSheet - Focus management + Escape on every modal (PIN, Lightbox, Onboarding, ContextSheet, data-mode sheet, leave-confirm, HTML guide, host/admin ban + PIN-display modals) - Sheet backdrops are real buttons with aria-label - Silent ApiError catches now surface via global Toaster Major polish: - Dark-mode parity on HashtagChips + avatars (shared palette) - Conditional Export tab in BottomNav (badge dot when ZIP ready) - Back chevrons on /recover (history-aware) and /export - Upload composer discard confirmation when content is staged - Camera segmented Photo/Video shutter - PIN auto-submit on 4th digit, paste-flash-free (controlled input) - Welcome-back toast on /feed after PIN recovery Minor: - Skeleton states on feed; pull-to-refresh with live drag indicator - Haptics on like / capture / submit / PIN-copy / onboarding complete - Comment 500-char counter; quota "Fast voll" / "Limit erreicht" labels - Onboarding pip ≥24px tap targets; long-press hint step - overscroll-behavior lock on <html> while feed mounted - teardownExportStatus wired via onClearAuth (covers 401 + explicit logout) - ConfirmSheet per-instance titleId; Modal requires titleId or ariaLabel Tests (7 new Playwright specs): - 01-auth/pin-auto-submit, 01-auth/back-chevron - 03-feed/confirm-sheet-delete, 03-feed/toast-on-failure - 09-mobile/focus-trap, 09-mobile/sheet-escape, 09-mobile/upload-cancel-confirm FOLLOWUPS.md captures the deferred AT inert containment work with acceptance criteria + implementation sketches. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
28 lines
1.1 KiB
Svelte
28 lines
1.1 KiB
Svelte
<script lang="ts">
|
|
interface Props {
|
|
variant?: 'card' | 'tile';
|
|
}
|
|
let { variant = 'card' }: Props = $props();
|
|
</script>
|
|
|
|
{#if variant === 'card'}
|
|
<article class="animate-pulse bg-white dark:bg-gray-900" aria-hidden="true">
|
|
<div class="flex items-center gap-3 px-4 py-3">
|
|
<div class="h-9 w-9 rounded-full bg-gray-200 dark:bg-gray-800"></div>
|
|
<div class="flex-1 space-y-1.5">
|
|
<div class="h-3 w-32 rounded bg-gray-200 dark:bg-gray-800"></div>
|
|
<div class="h-2.5 w-20 rounded bg-gray-200 dark:bg-gray-800"></div>
|
|
</div>
|
|
</div>
|
|
<!-- 4:5 matches the typical portrait card better than a square; reduces layout shift on first paint. -->
|
|
<div class="aspect-[4/5] w-full bg-gray-200 dark:bg-gray-800"></div>
|
|
<div class="flex gap-4 px-4 py-3">
|
|
<div class="h-4 w-10 rounded bg-gray-200 dark:bg-gray-800"></div>
|
|
<div class="h-4 w-10 rounded bg-gray-200 dark:bg-gray-800"></div>
|
|
</div>
|
|
<div class="border-b border-gray-100 dark:border-gray-800"></div>
|
|
</article>
|
|
{:else}
|
|
<div class="aspect-square animate-pulse bg-gray-200 dark:bg-gray-800" aria-hidden="true"></div>
|
|
{/if}
|