feat: add contribution heatmap drill-down sheet on cell click (#227)#426
feat: add contribution heatmap drill-down sheet on cell click (#227)#426devendra-w wants to merge 6 commits into
Conversation
|
@devendra-w 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):
|
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Feature is broken — API shape mismatch.
The component fetches /api/metrics/contributions?days=365 and reads result.repos?.[date]. The actual API response shape is { days, total, data: Record<string, number> } — a flat date→count map with no repos key. result.repos will always be undefined, so the sheet always shows "No commit data available for this day."
To fix: either add a new endpoint that returns per-repo breakdown for a specific date, or restructure the existing endpoint to include repo-level data.
Other issues:
- Full 365-day dataset is re-fetched on every cell click — the heatmap already has this data, pass it down as a prop instead
- Missing EOF newline on both
DailyBreakdownSheet.tsxandContributionHeatmap.tsx onCloseinuseEffectdep array with an inline() => setSelectedDate(null)creates a new ref each render, causing the event listener to be removed/re-added constantly — wrap inuseCallbackor use auseRef
…t listener, add EOF newlines
|
Hi @Priyanshu-byte-coder! I've addressed all the requested changes:
Ready for re-review! |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Issues found in this PR:
- Missing EOF newline — add a trailing newline to all modified files.
…w/devtrack into feat/heatmap-drilldown
Summary
Adds a slide-in panel when clicking a heatmap cell, showing the daily commit breakdown by repository. Panel is keyboard accessible and closes on Escape or backdrop click.
Closes #227
Type of Change
Changes Made
src/components/DailyBreakdownSheet.tsx— slide-in panel showing date, repo names, commit counts and linkssrc/components/ContributionHeatmap.tsx— addedselectedDatestate andonClickhandler on each cellHow to Test
/dashboardScreenshots (if UI change)
N/A - requires auth to test
Checklist
npm run lintpasses locally