feat(languages): upgrade Language Breakdown widget to Recharts donut chart (#938)#2231
feat(languages): upgrade Language Breakdown widget to Recharts donut chart (#938)#2231mallya-m wants to merge 1 commit into
Conversation
|
@mallya-m is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
|
Hey @Priyanshu-byte-coder — PR is up! What I built:
No new dependencies — Could you add Closes #938 |
|
Ready for review @Priyanshu-byte-coder! Single file change, no new dependencies, all CI checks passing. |
Summary
Closes #938 — upgrades the Language Breakdown widget from a stacked bar to a Recharts donut chart with interactive tooltips and a clean legend.
Type of Change
Changes Made
src/components/LanguageBreakdown.tsx— single file changeRechartsPieChart(donut style) usinginnerRadius/outerRadiusfor the ring shapeLanguageTooltipcomponent that shows language name and percentage on hoverOtherbucket logic for languages beyond the top 6 (percentage remainder grouped automatically)sm+rechartswas already installed in the projectHow to Test
Checklist
npm run lintpasses locallynpx tsc --noEmit 2>&1 | Select-String "LanguageBreakdown"→ blank)npm run build→ ✓ Compiled successfullyAccessibility Checklist
role="img"andaria-labelrole="img"andaria-labelwith language namerole="status",aria-live="polite",aria-busy="true", andsr-onlytextAdditional Notes
The
LanguageBreakdowncomponent, API route (/api/metrics/languages), widget ID (language-breakdown), and dashboard registration were all already in place. This PR upgrades only the visual layer — the data pipeline is unchanged.