Feat: Added commit diff size trend [ISSUE: #174]#390
Conversation
|
@abdullahxyz85 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. |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
API route and chart component look clean. Two issues:
1. cursor={{ fill: "var(--accent)/10" }} is invalid
In DiffTrendChart.tsx, the recharts cursor prop passes fill: "var(--accent)/10" as an SVG attribute — var(--accent)/10 is Tailwind shorthand syntax, not valid CSS/SVG. SVG will ignore it (no fill applied). Replace with a transparent or semi-transparent value:
cursor={{ fill: "rgba(99, 102, 241, 0.1)" }}Or just omit the cursor prop to use recharts default.
2. DiffTrendChart not registered in dashboard/page.tsx
The chart component is created but never imported or rendered anywhere. Add it to the dashboard page (inside the grid of widgets) so it actually appears.
… replace Tailwind syntax with valid rgba and register chart component in dashboard
|
@Priyanshu-byte-coder Done! Please make sure to add the label: gssoc:approved and level:adavanced. |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
- accountId used as github_login — getUserTopRepos(token, accountId) passes the numeric GitHub ID string for non-primary accounts, not the login. users//repos will fail. Look up github_login from DB first. 2. Deletions not abs() — GitHub code_frequency returns negative integers for deletions. Apply Math.abs() before charting or bars render below axis. 3. Hardcoded cursor color — rgba(99, 102, 241, 0.1) is hardcoded indigo. Use a CSS var. 4. No caching — wrap in withMetricsCache; 3 stats API calls per load hits secondary rate limits.
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
This PR has merge conflicts with main. Please rebase on the latest main branch and force-push to resolve:
git fetch origin
git rebase origin/main
git push --force-with-lease
Summary [ISSUE: #174 ]
Adds a stacked bar chart showing lines added vs. removed per week over the last 12 weeks, giving insight into codebase growth patterns.
What's Changed
DiffTrendChartcomponent in dashboardImplementation Details
/repos/{owner}/{repo}/stats/code_frequencyAcceptance Criteria Met: ISSUE: #174
Visual Overview:
Code Change Trend:
Closes: #174