Skip to content

feat: Implement Leaderboard Query Pagination & Infinite Scroll (#37)#77

Open
nitishchaubeyy wants to merge 2 commits into
indresh404:mainfrom
nitishchaubeyy:feat/leaderboard-pagination
Open

feat: Implement Leaderboard Query Pagination & Infinite Scroll (#37)#77
nitishchaubeyy wants to merge 2 commits into
indresh404:mainfrom
nitishchaubeyy:feat/leaderboard-pagination

Conversation

@nitishchaubeyy
Copy link
Copy Markdown
Contributor

Description

Resolves #37

Refactored the GitRank leaderboard query to optimize Firestore read costs and improve browser rendering performance as the community grows.

Changes Made:

  • Replaced the full collection onSnapshot query with a limit(50) query ordered by points.totalPoints.
  • Implemented cursor-based pagination using Firestore's startAfter method.
  • Added a loadMoreUsers function that fetches the next 50 developers and appends them to the existing list.
  • Integrated a "Load More Developers" UI button at the bottom of the table to trigger the pagination smoothly.
  • Removed expensive client-side sorting as the query now handles ordering natively.

Checklists:

  • Tested the UI integration locally.
  • Followed the project's code style and guidelines.
  • Optimized for thousands of documents.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ranker-hub Ready Ready Preview, Comment May 29, 2026 8:26pm

@indresh404 indresh404 changed the title 🚀feat: Implement Leaderboard Query Pagination & Infinite Scroll (#37) feat: Implement Leaderboard Query Pagination & Infinite Scroll (#37) May 29, 2026
@indresh404
Copy link
Copy Markdown
Owner

@nitishchaubeyy fix lint ci test

@indresh404 indresh404 changed the title feat: Implement Leaderboard Query Pagination & Infinite Scroll (#37) fix: Implement Leaderboard Query Pagination & Infinite Scroll (#37) May 29, 2026
@indresh404 indresh404 changed the title fix: Implement Leaderboard Query Pagination & Infinite Scroll (#37) feat: Implement Leaderboard Query Pagination & Infinite Scroll (#37) May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-review PR is pending review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PERFORMANCE] Leaderboard Query Pagination & Infinite Scroll

2 participants