fix(ui): ensure dark mode coherence across charting components#1552
Conversation
|
@ArshVermaGit 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):
|
ArshVermaGit
left a comment
There was a problem hiding this comment.
Hi @Priyanshu-byte-coder ! Issue #1551 has been resolved. Please review the PR and merge it under GSSoC. Thanks!
745c576
into
Priyanshu-byte-coder:main
|
🎉 Merged! Thanks for contributing to DevTrack. If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers. Keep an eye on open issues for your next contribution! |
Description
This PR resolves an issue where third-party charting libraries (Recharts) used hardcoded hex colors, causing visual clashes when the dashboard was toggled into dark mode. By passing the semantic CSS variables defined in
globals.cssdirectly to the charting components, all data visualizations now adapt elegantly to the active theme.Resolved Issue
Resolves #1551
Key Changes
PRBreakdownChart.tsx: Updated PR status slices to use semantic variables (var(--accent),var(--success),var(--warning),var(--muted-foreground)).ComparisonChart.tsx: Updated the comparison bar graph to usevar(--accent-secondary)instead of a hardcoded indigo hex value.MiniPRTrendChart.tsx: Swapped hardcoded green/red stroke colors forvar(--success)andvar(--destructive).RepoTimelineChart.tsx: Replaced undefined chart CSS variables withvar(--accent-secondary)andvar(--warning).CodingTimeWidget,PRReviewTrendChart,CommitTimeChart, andPRStatusDonutChartalready correctly leverage theme tokens.Type of change
How Has This Been Tested?
npm run buildto verify that all modifications compile without type errors.