-
Notifications
You must be signed in to change notification settings - Fork 136
Feature: Add badges #1176
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
Feature: Add badges #1176
Conversation
…ay functionality in leaderboard component
|
@yashksaini-coder is attempting to deploy a commit to the recode Team on Vercel. A member of the Team first needs to authorize it. |
|
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! 😊 |
|
@sanjay-kv Hi please review this PR and let me know the status, Final Preview:-
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@yashksaini-coder , need to fix this |
|
@Adez017 can you check the bug too. |
ok @sanjay-kv , will check this out. |
|
@yashksaini-coder , any updates on this . i think there is some changes for with and thats getting the error in DOM . could you rectify on this ? |
Yes just finished dinner, working on a fix |
… implement Escape key functionality to close modal
|
✅ Synchronized metadata from Issue #1002:
|
|
✅ Synchronized metadata from Issue #1002:
|
|
@sanjay-kv @Adez017 Please review I've refactored and fix the errors, also add A new Badge Component showcase area Component Add.Badges.webm |
|
@yashksaini-coder , pretty good work :) . resolve the conflicts and we are good to go. |
|
✅ Synchronized metadata from Issue #1002:
|
Conflicts resolved, please do final review @Adez017 |
|
@sanjay-kv , ready to merge |

Fixes: #1002
Description
This PR fixes the
useColorModehook error that was causing the leaderboard page to crash and implements UI improvements for the badge display system. The leaderboard was previously crashing with the error "Hook useColorMode is called outside the " when navigating to/dashboard#leaderboard. Additionally, this PR enhances the badge display by adding a dedicated column and increasing badge sizes for better visibility.Key Changes:
useColorModehook error by implementinguseSafeColorModehook that safely handles SSR and DOM-based theme detectionType of Change
Changes Made
Bug Fixes:
Fixed
useColorModehook error inleaderboard.tsxandPRListModal.tsxuseColorModefrom@docusaurus/theme-commonwith customuseSafeColorModehookdata-themeattribute) instead of relying on ColorModeProvider contextFixed
useNavbarMobileSidebarhook error inNavbar/Content/index.tsxSafeMobileSidebarTogglewrapper component to handle cases where provider isn't availableUI/UX Improvements:
Added dedicated "Badges" column to leaderboard table
grid-template-columns: 0.5fr 0.5fr 2fr 1fr 1fr 1.5frIncreased badge sizes for better visibility:
Enhanced badge styling:
Files Modified:
src/components/dashboard/LeaderBoard/leaderboard.tsx- Fixed hook usage, added badges columnsrc/components/dashboard/LeaderBoard/PRListModal.tsx- Fixed hook usagesrc/components/dashboard/LeaderBoard/leaderboard.css- Updated styles for new column and larger badgessrc/utils/useSafeColorMode.ts- Custom hook for safe color mode detection (already existed, now used)src/theme/Navbar/Content/index.tsx- Fixed mobile sidebar toggle errorDependencies
@docusaurus/ExecutionEnvironmentChecklist
npm run buildand attached screenshot(s) in this PR.Screenshots
Before: Leaderboard page crashed with
useColorModeerrorAfter: Leaderboard loads successfully with badges displayed in dedicated column
Testing
/dashboard#leaderboardrouteuseColorModeRelated Issues
Fixes the
useColorModehook error that was preventing the leaderboard page from loading.