-
Notifications
You must be signed in to change notification settings - Fork 51
Leaderboard Implementation #512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Adez017 <142787780+Adez017@users.noreply.github.com>
Fix dashboard sidebar navigation and integrate LeaderBoard component properly
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. The estimated time for response is 5–8 hrs. In the meantime, please provide all necessary screenshots and make sure you run - npm build run , command and provide a screenshot, a video recording, or an image of the update you made below, which helps speed up the review and assignment. If you have questions, reach out to LinkedIn. Your contributions are highly appreciated!😊 Note: I maintain the repo issue every day twice at 8:00 AM IST and 9:00 PM IST. If your PR goes stale for more than one day, you can tag and comment on this same issue by tagging @sanjay-kv. We are here to help you on this journey of open source. Consistent 20 contributions are eligible for sponsorship 💰 🎁 check our list of amazing people we sponsored so far: GitHub Sponsorship. ✨ 📚Your perks for contribution to this community 👇🏻
If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊 |
@Adez017 is attempting to deploy a commit to the recode Team on Vercel. A member of the Team first needs to authorize it. |
Hi @sanjay-kv @iitzIrFan , to make things clear this is the implementation for the leaderboard . |
Also to be note down, i had implemented the caching but , for the initial load it is taking time as we are fetching data across the 9 or 10 repos, i think @sanjay-kv @itz |
![]() If this error is due to github access token then, it should be fine when @sanjay-kv merges it into main. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a leaderboard feature to replace the existing contributors section in the dashboard. The main purpose is to enhance community engagement by providing real-time GitHub-based contributor rankings with an improved user interface.
Key changes include:
- Replaced hardcoded contributor data with dynamic GitHub API integration
- Added a new standalone LeaderBoard component with filtering and pagination
- Enhanced the stats provider to fetch real contributor data from all organization repositories
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/pages/dashboard/index.tsx | Major refactoring to remove hardcoded leaderboard logic and integrate new LeaderBoard component |
src/lib/statsProvider.tsx | Enhanced to fetch real contributor data from GitHub API with proper token authentication |
src/components/navbar/NavbarIcon.tsx | Modified to support both dashboard and navbar usage patterns through type guards |
src/components/dashboard/LeaderBoard/leaderboard.tsx | New comprehensive leaderboard component with search, pagination, and responsive design |
src/components/dashboard/LeaderBoard/leaderboard.css | Complete styling for the new leaderboard component with dark/light theme support |
package.json | Updated dotenv dependency version |
docusaurus.config.ts | Added environment variable configuration for GitHub token access |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
text="LeaderBoard | ||
" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an unnecessary line break in the text string. Should be 'LeaderBoard' on a single line.
text="LeaderBoard | |
" | |
text="LeaderBoard" |
Copilot uses AI. Check for mistakes.
@@ -1,64 +1,201 @@ | |||
// src/lib/statsProvider.tsx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file path comment should match the actual file path: src/lib/statsProvider.tsx
Copilot uses AI. Check for mistakes.
@@ -0,0 +1,319 @@ | |||
// src/pages/dashboard/LeaderBoard/leaderboard.tsx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file path comment is incorrect. Should be src/components/dashboard/LeaderBoard/leaderboard.tsx
to match the actual file location.
// src/pages/dashboard/LeaderBoard/leaderboard.tsx | |
// src/components/dashboard/LeaderBoard/leaderboard.tsx |
Copilot uses AI. Check for mistakes.
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Hi @iitzIrFan , no it will load but will take some time like a minute or less |
Did you see the others changes @iitzIrFan ? |
@Adez017 Yeah it looks fine ! |
Check out the others tabs also like giveaway , etc . i think we need to fix the cards on the giveaway |
@Adez017 The sidebar and the body needs some changes, you can work on that, if you like. You can raise issue for it & work on it ! |
could you help i out , i had tried but one thing got fix other breaks out . i will try from my end but need your support thouroughly |
Sure, just a small request for this PR can you optimize the loading behaviour as it is still not loading on my side from past 5-7 mins ! |
let me check , will update soon @iitzIrFan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to optimize the data loading behaviour assigned to @Adez017 rest is fine.
Hi @iitzIrFan , i had pushed changes for data loading optimization . let me know if it works or not . |
Also, i want you to please check out the giveaway page, I think it needs a little fix @iitzIrFan |
Also @iitzIrFan , this need to be fixed . we need the previous and next button here . |
@sanjay-kv , waiting for you in the meet |
joining in |
@sanjay-kv , add the lables over here also . and if possible could you give level 3 here. |
Description
This Pr includes the addition of the dashboard in the place of the contributors section in the dashboard
Fixes #158
Type of Change
Changes Made
Added the leaderboard implementtation in a separate file
Dependencies
Checklist
npm run build
and attached scrrenshot in this PR.