Skip to content

feat: add loading skeleton for Repository Dashboard - #34

Closed
AliMahmoudDev wants to merge 1 commit into
voidswift:mainfrom
AliMahmoudDev:feat/dashboard-skeleton
Closed

AliMahmoudDev wants to merge 1 commit into
voidswift:mainfrom
AliMahmoudDev:feat/dashboard-skeleton

Conversation

@AliMahmoudDev

Copy link
Copy Markdown
Contributor

Summary

Closes #3

Adds a loading.tsx file that displays a skeleton UI while the dashboard server component fetches data.

What it does

  • Creates apps/web/src/app/dashboard/loading.tsx following the Next.js App Router convention
  • The skeleton mirrors the exact layout of the dashboard page:
    • Metrics section: 4 cards with pulsing label and value placeholders matching the "Tracked Repositories", "Commits", "Open PRs", and "Closed PRs" cards
    • Repositories section: 6 cards with name, full name, visibility badge, and sync status placeholders
  • Uses animate-pulse from Tailwind CSS for smooth pulsing animation
  • Skeleton dimensions match the final rendered cards, preventing layout shift when data arrives

Design decisions

  • Used Next.js loading.tsx convention instead of a separate component + isLoading check, since the dashboard page is a server component (async function) — React Suspense with loading.tsx is the idiomatic approach
  • Gray-200 and gray-100 backgrounds to match the existing card border/shadow aesthetic
  • 6 repo card skeletons to match a typical 3-column grid with 2 rows

Add a loading.tsx file that mirrors the dashboard page layout:
- 4 metric cards with pulsing label and value placeholders
- 6 repository cards with name, fullname, badge, and status placeholders
- All skeletons use Tailwind animate-pulse matching the existing card styles

This follows the Next.js App Router convention where loading.tsx
is shown automatically while the server component fetches data.

Closes voidswift#3
@SHAURYASANYAL3

Copy link
Copy Markdown
Member

Hey @AliMahmoudDev
It looks like you accidentally opened two Pull Requests for this feature. I just reviewed and merged your other
one (PR #35) because you included the awesome repository/[id]/loading.tsx file in that one as well!

I'm going to close this specific PR as a duplicate, but your code is already going to be merged into main via
PR
#35. Thank you again for the amazing first contribution! 🌟

Make sure to join our Discord to hang out with the team: https://discord.gg/D2jCpbYgQJ

@AliMahmoudDev

Copy link
Copy Markdown
Contributor Author

Good PR for the Forge-Lens dashboard! The component looks well-structured. One thought: adding TypeScript interfaces for the props would make the component easier to use and catch type errors at compile time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a loading skeleton state for the Repository Dashboard

2 participants