feat(ui): replace skeleton loaders with honest loading states

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-21 13:40:58 -05:00
parent 0ee4416077
commit 17037e4936
41 changed files with 101 additions and 275 deletions

View File

@@ -12,7 +12,7 @@ import { EventStreamProvider } from '@/contexts/EventStreamContext'
import type { FleetDevice } from '@/lib/api'
import { AppLayout } from '@/components/layout/AppLayout'
import { PageTransition } from '@/components/layout/PageTransition'
import { Skeleton } from '@/components/ui/skeleton'
import { LoadingText } from '@/components/ui/skeleton'
import { ErrorBoundary } from '@/components/ui/error-boundary'
export const Route = createFileRoute('/_authenticated')({
@@ -164,11 +164,7 @@ function AuthenticatedLayout() {
if (isLoading) {
return (
<div className="flex items-center justify-center min-h-screen bg-background">
<div className="space-y-4 w-64">
<Skeleton className="h-8 w-48 mx-auto" />
<Skeleton className="h-4 w-full" />
<Skeleton className="h-4 w-3/4" />
</div>
<LoadingText />
</div>
)
}

View File

@@ -800,7 +800,7 @@ function DeviceAlertsSection({
const resolvedAlerts = alerts.filter((a) => a.status === 'resolved').slice(0, 5)
if (isLoading) {
return <TableSkeleton rows={3} />
return <TableSkeleton />
}
return (

View File

@@ -23,7 +23,7 @@ function TenantDetailPage() {
})
if (isLoading) {
return <CardGridSkeleton cards={3} />
return <CardGridSkeleton />
}
if (!tenant) {

View File

@@ -26,9 +26,8 @@ function SiteDetailPage() {
if (isLoading) {
return (
<div className="animate-pulse space-y-4">
<div className="h-6 w-48 bg-elevated rounded" />
<div className="h-4 w-64 bg-elevated rounded" />
<div className="py-8 text-center">
<span className="text-[9px] text-text-muted">Loading&hellip;</span>
</div>
)
}