Skip to content

feat(ui): add skeleton loading states during data fetch #170

@mpiton

Description

@mpiton

Feature Request

Problem

When data is being fetched (GitHub sync, initial load), there are no loading indicators or skeleton screens. Data appears instantly or not at all, giving no feedback to the user about the app's state.

Current Behavior

  • No skeleton/placeholder content during TanStack Query isLoading states
  • No spinner or progress indicators
  • Content jumps in when data arrives

Proposed Solution

  1. Create a reusable Skeleton component using animate-pulse bg-surface pattern
  2. Add skeleton variants for: card (ReviewCard, MyPrCard), list item (issues, activity), stats bar
  3. Show skeletons during TanStack Query isLoading state in each view component
  4. Use aria-busy="true" on loading containers for accessibility

Implementation Sketch

// src/components/atoms/Skeleton.tsx
function Skeleton({ className }: { className?: string }) {
  return <div className={`animate-pulse rounded bg-surface ${className}`} />;
}

function CardSkeleton() {
  return (
    <div className="flex items-center gap-3 rounded border border-border px-3 py-2">
      <Skeleton className="h-4 w-32" />
      <Skeleton className="h-4 w-16" />
      <Skeleton className="ml-auto h-6 w-14" />
    </div>
  );
}

Files to Modify

  • src/components/atoms/Skeleton.tsx (new)
  • src/components/ReviewQueue/ReviewQueue.tsx
  • src/components/MyPRs/MyPRs.tsx
  • src/components/Issues/Issues.tsx
  • src/components/ActivityFeed/ActivityFeed.tsx
  • src/components/StatsBar/StatsBar.tsx

References

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions