Skip to content

Skeleton Loading States for Invoice Cards #465

Description

@Kingsman-99

Description

While the invoice list fetches data, users see a blank white region with no indication of progress, which feels like a broken page. Animated skeleton placeholders matching the shape of real invoice cards should occupy the list until data arrives.

Technical Context

src/components/invoice/InvoiceCardSkeleton.tsx (new) renders a gray animated placeholder using Tailwind's animate-pulse class for the title, amount, status badge, and recipient count areas. src/components/invoice/InvoiceList.tsx conditionally renders an array of eight skeleton cards when isLoading from src/hooks/useInvoices.ts is true. src/components/ui/Skeleton.tsx provides the base pulsing rectangle primitive used throughout the app.

Acceptance Criteria

  • Eight skeleton cards render immediately while the first page of invoices loads
  • Skeleton dimensions match the actual invoice card height and internal layout proportions
  • Skeletons animate with a shimmer or pulse effect at approximately 60 fps with no layout shift
  • When data resolves, skeleton cards are replaced by real cards without a visible flash
  • If the fetch errors, skeletons are replaced by an error state, not left on screen indefinitely
  • All CI checks (npm test, npm run build, ESLint/TypeScript) pass and the branch has no merge conflicts

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions