feat: add error boundaries, loading skeletons, page transitions, and empty states

- ErrorBoundary: global error boundary with ShieldAI branding, retry/report
- Skeleton: SkeletonText, SkeletonCard, SkeletonAvatar, SkeletonTable
- PageTransition: fade-in + translate-y on route change, respects reduced motion
- EmptyState: reusable component with icon, title, description, action
- Button: add ariaLabel prop support
- Toast: add aria-live=polite region
- Dashboard: replace pulse divs with SkeletonCard fallbacks
- Service pages: add skeleton layouts, empty states, mutation loading states
- 404 page: polished with ShieldAI branding and home navigation
- app.tsx: add ErrorBoundary, PageTransition, skip-to-content link
- app.css: add page-enter animation with prefers-reduced-motion support
This commit is contained in:
2026-05-25 18:05:29 -04:00
parent c02457c66a
commit 20dc5bf785
18 changed files with 771 additions and 179 deletions

View File

@@ -6,7 +6,7 @@ import { ThemeProvider } from "./lib/theme";
import { ClerkProvider } from "clerk-solidjs/start";
import { ClerkLoaded, ClerkLoading, useAuth } from "clerk-solidjs";
import { AppShell } from "./components/layout";
import { ToastProvider } from "./components/ui";
import { ToastProvider, ErrorBoundary, PageTransition } from "./components/ui";
import "./app.css";
@@ -71,7 +71,19 @@ export default function App() {
root={(props) => (
<ClerkApp>
<AppShell>
<Suspense>{props.children}</Suspense>
<a
href="#main-content"
class="sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:bg-[var(--color-bg)] focus:text-[var(--color-text-primary)] focus:rounded-lg focus:shadow-lg focus:outline-2 focus:outline-[var(--color-focus-ring)]"
>
Skip to main content
</a>
<ErrorBoundary>
<Suspense>
<PageTransition>
{props.children}
</PageTransition>
</Suspense>
</ErrorBoundary>
</AppShell>
</ClerkApp>
)}