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.
|
@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
d101b4c to
b573393
Compare
Skeleton loaders on the dashboard were silent for screen-reader users — no announcement during fetch and no signal when content arrived. Each widget's skeleton block now exposes a polite live region so assistive tech can describe loading state without visual or behavioral changes. For every widget skeleton: - Wrapper element gets role="status", aria-live="polite", aria-busy="true". - A visually hidden <span class="sr-only">Loading [widget]</span> provides the accessible name (reuses Tailwind's built-in sr-only utility, matching existing usage in src/app/dashboard/settings/page.tsx). - Each decorative pulse <div> gets aria-hidden="true" so only the status message is announced, not the placeholders themselves. Completion is communicated implicitly: when loading flips false the status region unmounts and the real content (with its existing heading) renders. No explicit "loaded" announcement is added, which avoids a cascade of overlapping ready messages as 13 widgets finish at different times. Closes Priyanshu-byte-coder#324.
… replace Tailwind syntax with valid rgba and register chart component in dashboard
b573393 to
9b12996
Compare
|
@Priyanshu-byte-coder Now all the things are fixed , u can merge it easily , please make sure to add the label: gssoc:approved. |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Two issues, plus now conflicting:
- Conflicting with main —
globals.csschanges conflict with recent merges. Please rebase:git fetch upstream git rebase upstream/main git push --force-with-lease - After rebase, remove duplicate
--successand--destructiveadditions to globals.css — these vars are already defined in main. Remove the additions and just usevar(--success)andvar(--destructive). - Raw Tailwind red colors —
border-red-500/20,bg-red-500/10,text-red-400,border-red-500/30,text-red-300,hover:bg-red-500/10→ replace withvar(--destructive)
Conflicts resolved and things implemented, now u can merge it easily ! @Priyanshu-byte-coder |
|
Merge conflict with current main. Please rebase against main to resolve before this can be merged. |
|
This PR has merge conflicts with |
|
@Priyanshu-byte-coder Conflicts resolved , now u can merge it easily. |
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