Skip to content

perf: Lazy load below-the-fold dashboard widgets (#1036)#1202

Merged
Priyanshu-byte-coder merged 10 commits into
Priyanshu-byte-coder:mainfrom
Akash1510:feat/lazy-dashboard-widgets
May 28, 2026
Merged

perf: Lazy load below-the-fold dashboard widgets (#1036)#1202
Priyanshu-byte-coder merged 10 commits into
Priyanshu-byte-coder:mainfrom
Akash1510:feat/lazy-dashboard-widgets

Conversation

@Akash1510
Copy link
Copy Markdown
Contributor

Summary

Implemented lazy loading for below-the-fold dashboard widgets using IntersectionObserver to defer rendering and API requests until widgets enter the viewport.

Closes #1036

Type of Change

  • Refactor / code cleanup

Changes Made

  • Added reusable LazyWidget component using IntersectionObserver
  • Deferred rendering of below-the-fold dashboard widgets
  • Added skeleton placeholders while widgets are outside viewport
  • Prevented unnecessary API calls during initial dashboard load
  • Preserved layout dimensions to avoid layout shift (CLS)

Lazy-loaded widgets

  • ContributionHeatmap
  • FriendComparison
  • PRReviewTrendChart
  • IssueMetrics
  • CIAnalytics
  • DiscussionsWidget
  • PinnedRepos
  • InactiveRepositoriesCard
  • TopRepos
  • LanguageBreakdown
  • RecentActivity

Before

  • All dashboard widgets rendered immediately on page load
  • All associated API requests fired during initial mount
  • Higher initial render workload
  • Slower Time to Interactive

After

  • Below-the-fold widgets render only when entering viewport
  • API requests are deferred until needed
  • Reduced initial dashboard rendering cost
  • Improved progressive loading behavior

How to Test

  1. Run locally
npm install
npm run dev
  1. Open /dashboard

  2. Open DevTools → Network tab

  3. Verify:

  • Above-the-fold widgets load immediately
  • Below-the-fold widget requests trigger only on scroll
  • Skeleton placeholders render correctly
  • No layout shift occurs
  1. Run checks
npm run lint
npm run build

Screenshots

N/A (performance optimization)

Checklist

  • Linked issue in summary
  • npm run lint passes locally
  • No TypeScript errors
  • Self-reviewed the diff

@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 2026

@Akash1510 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:performance GSSoC type bonus: performance (+15 pts) labels May 27, 2026
@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

This PR has a merge conflict with main (overlaps with recently merged dashboard page changes). Please rebase your branch and resolve conflicts so we can merge it.

@Akash1510
Copy link
Copy Markdown
Contributor Author

kindly check this

1 similar comment
@Akash1510
Copy link
Copy Markdown
Contributor Author

kindly check this

@Akash1510
Copy link
Copy Markdown
Contributor Author

Kindly check PR

Priyanshu-byte-coder added a commit that referenced this pull request May 28, 2026
…erver (#1202)

Co-authored-by: Akash1510 <Akash1510@users.noreply.github.com>
@Priyanshu-byte-coder Priyanshu-byte-coder added gssoc:approved GSSoC: PR approved for scoring level:intermediate GSSoC: Intermediate difficulty (35 pts) labels May 28, 2026
@Priyanshu-byte-coder Priyanshu-byte-coder merged commit cb4f5f0 into Priyanshu-byte-coder:main May 28, 2026
3 checks passed
@github-actions
Copy link
Copy Markdown

🎉 Merged! Thanks for contributing to DevTrack.

If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers.

Keep an eye on open issues for your next contribution!

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

Labels

gssoc:approved GSSoC: PR approved for scoring gssoc26 GSSoC 2026 contribution level:intermediate GSSoC: Intermediate difficulty (35 pts) type:performance GSSoC type bonus: performance (+15 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf: lazy load dashboard widgets below the fold

2 participants