Skip to content

feat(ui): add skeleton loaders for dashboard components during API fetch#2180

Open
VIDYANKSHINI wants to merge 2 commits into
Priyanshu-byte-coder:mainfrom
VIDYANKSHINI:feat/dashboard-skeletons
Open

feat(ui): add skeleton loaders for dashboard components during API fetch#2180
VIDYANKSHINI wants to merge 2 commits into
Priyanshu-byte-coder:mainfrom
VIDYANKSHINI:feat/dashboard-skeletons

Conversation

@VIDYANKSHINI
Copy link
Copy Markdown
Contributor

Summary

Implemented custom responsive skeleton loaders for dashboard components to prevent layout shifts and improve perceived performance while API data is being fetched.

Closes #1144


Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup

Changes Made

  • Replaced generic SkeletonCard in CustomizableDashboard.tsx with specialized layout-matching skeletons (RepoWidgetSkeleton, ChartSkeleton, ProfileStatsSkeleton, ContributionHeatmapSkeleton).
  • Updated internal loading UI in TopRepos.tsx and PinnedReposWidget.tsx to utilize the detailed skeleton designs.
  • Added src/app/leaderboard/loading.tsx to provide an instant skeleton state for the server-rendered leaderboard route.

How to Test

Steps for the reviewer to verify this works:

  1. Open DevTools and set network throttling to 'Slow 3G'.
  2. Navigate to the Dashboard and observe the detailed skeletons matching the actual widget layouts.
  3. Navigate to the Leaderboard and observe the new loading.tsx skeleton while the data is being fetched.
  4. Toggle between light and dark themes to verify that the skeletons' pulse and colors adapt seamlessly.

Screenshots (if UI change)

N/A


Checklist

  • Linked issue in summary
  • npm run lint passes locally
  • No TypeScript errors (npm run type-check)
  • Self-reviewed the diff
  • Added/updated tests if applicable

Accessibility Checklist

  • Proper keyboard navigation tested
  • Responsive UI verified
  • Accessibility labels added where needed (using aria-busy and aria-live on skeletons)

Additional Notes

This enhancement uses Tailwind's animate-pulse utility along with the existing CSS variables to ensure the skeletons natively support both light and dark themes without any hardcoded colors.

Copilot AI review requested due to automatic review settings June 7, 2026 15:23
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 7, 2026

@VIDYANKSHINI is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:design GSSoC type bonus: UI/design (+10 pts) type:feature GSSoC type bonus: new feature labels Jun 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 7, 2026

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR refreshes loading experiences across the dashboard and leaderboard by introducing more tailored skeleton UIs and wiring them into dynamic widget loading fallbacks.

Changes:

  • Replaced the generic dashboard SkeletonCard with multiple purpose-specific skeleton components and updated dynamic/LazyWidget fallbacks accordingly.
  • Updated loading placeholders in TopRepos and PinnedReposWidget to better match the final layouts.
  • Added a dedicated src/app/leaderboard/loading.tsx route-level skeleton for the public leaderboard page.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/components/dashboard/CustomizableDashboard.tsx Introduces exported skeleton components and updates dynamic/LazyWidget fallbacks to use them.
src/components/TopRepos.tsx Updates the loading skeleton rows to a more detailed “label + bar” skeleton layout.
src/components/PinnedReposWidget.tsx Replaces the previous shimmer placeholders with a structured card skeleton matching pinned repo cards.
src/app/leaderboard/loading.tsx Adds a full-page loading skeleton for the leaderboard route.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/TopRepos.tsx Outdated
Comment on lines 439 to 449
{[1, 2, 3, 4, 5].map((i) => (
<div key={i}>
<div className="flex items-center justify-between mb-2">
<div className="h-4 w-1/3 bg-[var(--card-muted)] rounded animate-pulse" />
<div className="h-4 w-16 bg-[var(--card-muted)] rounded animate-pulse" />
</div>
<div className="h-1.5 w-full bg-[var(--control)] rounded-full overflow-hidden">
<div className="h-full bg-[var(--card-muted)] animate-pulse w-1/2" />
</div>
</div>
))}
Comment on lines +60 to +69
export const RepoWidgetSkeleton = () => (
<div
role="status"
aria-busy="true"
aria-live="polite"
className="rounded-xl border border-[var(--border)] bg-[var(--card)] p-6 shadow-sm"
className="rounded-xl border border-[var(--border)] bg-[var(--card)] p-6 shadow-sm flex flex-col h-full"
>
<div className="h-6 w-48 bg-[var(--card-muted)] rounded mb-4 animate-pulse" />
<div className="h-40 bg-[var(--card-muted)] rounded animate-pulse" />
<div className="flex items-center justify-between mb-6">
<div className="h-6 w-40 bg-[var(--card-muted)] rounded animate-pulse" />
<div className="h-6 w-20 bg-[var(--card-muted)] rounded animate-pulse" />
</div>
Comment on lines 157 to 160
const PRMetrics = dynamic(() => import("@/components/PRMetrics"), {
ssr: false,
loading: () => <PRMetricsSkeleton />,
loading: () => <ProfileStatsSkeleton />,
});
Comment thread src/components/TopRepos.tsx Outdated
Comment on lines +445 to +447
<div className="h-1.5 w-full bg-[var(--control)] rounded-full overflow-hidden">
<div className="h-full bg-[var(--card-muted)] animate-pulse w-1/2" />
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution type:design GSSoC type bonus: UI/design (+10 pts) type:feature GSSoC type bonus: new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add skeleton loaders for dashboard components during API fetch

2 participants