feat: implement custom leaderboard timeframes #3108
Conversation
…PI integration - Implemented LeaderboardBrowser component to display leaderboard data with selectable timeframes (weekly, monthly, all-time). - Added functionality to sync selected timeframe with URL parameters. - Created tests for LeaderboardBrowser to ensure correct API fetching and loading states. - Introduced validation for unsupported timeframes in the leaderboard API route. - Added unit tests for leaderboard timeframe helpers, including normalization and aggregation of leaderboard data.
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
|
@Priyanshu-byte-coder can you review my PR |
|
@Priyanshu-byte-coder can you review this ?? |
|
@Priyanshu-byte-coder can you review this ?? |
|
Custom leaderboard timeframes is a nice feature, but the whole CI suite is failing here (Type check, Lint, Build, Test coverage, smoke + visual). Also the |
|
@Priyanshu-byte-coder can you check it now ? |
📌 Summary
This PR introduces support for custom leaderboard timeframes, allowing users to view rankings based on recent activity instead of only cumulative contributions.
The leaderboard now supports:
This improves leaderboard competitiveness, highlights recently active contributors, and increases community engagement.
Closes #3045
🚀 Changes Made
Backend
timeframequery parameter support to the leaderboard API.weeklymonthlyall_timeFrontend
Performance
✅ Testing
Verified the following:
400 Bad Request🛠️ Quality Checks
pnpm run lintpnpm run type-checkpnpm run testpnpm run buildClose #3045