-
Notifications
You must be signed in to change notification settings - Fork 120
Added PR's to the leaderboard #584
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 <[email protected]>
Co-authored-by: Adez017 <[email protected]>
Add clickable PR list modal to leaderboard for viewing contributor pull requests
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. |
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 adds PR details functionality to the leaderboard by implementing a modal that displays detailed information about contributors' merged pull requests.
- Added PR details tracking to contributors with title, URL, merge date, repository name, and PR number
- Created a modal component to display a list of individual PRs when users click on PR badges
- Implemented fallback mock data functionality for testing and error handling scenarios
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/lib/statsProvider.tsx | Extended data models and API processing to capture detailed PR information |
src/components/dashboard/LeaderBoard/mockData.ts | Added mock contributor data with PR details for testing purposes |
src/components/dashboard/LeaderBoard/leaderboard.tsx | Integrated modal functionality and clickable PR badges with fallback data handling |
src/components/dashboard/LeaderBoard/leaderboard.css | Added comprehensive styling for the PR modal component |
src/components/dashboard/LeaderBoard/PRListModal.tsx | New modal component for displaying detailed PR information |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
}; | ||
merged_at?: string | null; | ||
title?: string; | ||
html_url?: string; |
Copilot
AI
Sep 22, 2025
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.
These optional properties in PullRequestItem interface duplicate existing properties. The interface already has html_url on line 64, and these additions create redundancy. Consider consolidating or clarifying the purpose of these duplicate fields.
html_url?: string; | |
pr_url?: string; |
Copilot uses AI. Check for mistakes.
|
||
// Add detailed PR information | ||
if (pr.title && pr.html_url && pr.merged_at && pr.number) { | ||
contributor.prDetails = contributor.prDetails || []; |
Copilot
AI
Sep 22, 2025
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 prDetails array is already initialized on line 223 when creating a new contributor, making the null check on line 232 redundant. Consider removing this redundant initialization.
contributor.prDetails = contributor.prDetails || []; |
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
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
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
// Use mock data only in development mode when there's an error or no contributors | ||
const displayContributors = | ||
(error || contributors.length === 0) | ||
? (typeof process !== "undefined" && process.env.NODE_ENV === "development" |
Copilot
AI
Sep 22, 2025
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 typeof process !== "undefined"
check is unnecessary in a React/Node.js environment where process
is always available. This check is typically used for browser environments, but here you're already checking process.env.NODE_ENV
. Simplify to just check the environment directly.
? (typeof process !== "undefined" && process.env.NODE_ENV === "development" | |
? (process.env.NODE_ENV === "development" |
Copilot uses AI. Check for mistakes.
{error && ( | ||
<div className="error-banner" style={{ | ||
padding: '12px', | ||
backgroundColor: isDark ? '#fee8e7' : '#fee8e7', | ||
color: '#dc2626', | ||
borderRadius: '8px', | ||
marginBottom: '16px', | ||
fontSize: '14px', | ||
textAlign: 'center' | ||
}}> | ||
Demo Mode: Showing sample data due to API configuration issue | ||
</div> | ||
)} |
Copilot
AI
Sep 22, 2025
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 backgroundColor is the same for both dark and light modes (#fee8e7
). This will likely cause poor contrast in dark mode. The background should be different for dark mode, such as #991b1b
or another dark-appropriate color.
Copilot uses AI. Check for mistakes.
here is the video demonstration : https://drive.google.com/file/d/1_vJSKd7sST_oI4KquAprXwCLcsKvUvk2/view?usp=sharing |
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@sanjay-kv wait for now , don't merge it , i need to sync with @iitzIrFan changes |
Now ready to go @sanjay-kv , also @iitzIrFan , kindly review as of my end i test the filter also you created and its working but to be more sure you can test also |
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
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
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
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
It's amazingly done @Adez017 Thanks for this feature and yeah it is working with the filtering.
@sanjay-kv Ready for merge.
Love the collaboration here @iitzIrFan @Adez017 |
Hi @sanjay-kv , add the gssoc related labels |
Description
Fixes #532
Type of Change
Changes Made
Dependencies
Checklist
npm run build
and attached screenshot(s) in this PR.