Add empty state UI for TopRepos when no repositories found#89
Add empty state UI for TopRepos when no repositories found#89nangaretejal991-bit wants to merge 4 commits into
Conversation
|
@nangaretejal991-bit 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. |
There was a problem hiding this comment.
Thanks for your first PR on DevTrack! 🎉
A maintainer will review it within 48 hours. While you wait:
- Make sure CI is passing (type-check + lint)
- Double-check the PR description is filled out and the issue is linked
- Feel free to ask questions in Discussions if you need help
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
The empty state UI itself is solid — the 📁 icon, heading, and contextual message work well. One regression to fix.
Blocker
Error state removed from TopRepos.tsx
This PR removes the error state and the 'Try again' button that was added in a previous PR. When a network request fails, the component now silently sets repos = [] which shows the empty state — the user has no way to know something went wrong vs genuinely having no commits.
Keep both: restore the error state + retry button for fetch failures, and use the new empty state UI only for the repos.length === 0 case (actual empty data).
Minor
- Missing EOF newline.
- Trailing whitespace on a few blank lines inside the JSX.
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Two problems blocking merge:
1. Wrong files in diff — branch based off someone else's feature branch
DashboardHeader.tsx in this diff:
- Removes the commit count badge (merged in PR #132)
- Adds a copy-URL button (that's PR #66, a different contributor's work)
This PR should only touch TopRepos.tsx. The DashboardHeader changes are regressions against main.
2. aria-label removed from select
// Removed — put it back
aria-label="Select time range for top repositories"Fix:
git checkout main
git pull
git checkout -b fix/toprepos-empty-state
# re-apply only the TopRepos changesThe TopRepos changes themselves (error state restored + !r.ok check + empty state UI) are correct — just need them on a clean base without the DashboardHeader noise.
|
Hi @nangaretejal991-bit — this PR has a merge conflict with git fetch upstream
git rebase upstream/main
# resolve conflicts, keeping your empty state UI changes alongside the existing sort/link code
git push --force-with-leaseOnce rebased, we'll review and merge. |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
1. DashboardHeader regression — PR removes Share Profile link, 30-day commit badge, and settings fetch. These are unrelated to the TopRepos empty state fix. Revert all DashboardHeader changes.
2. aria-label removed — the time-range <select> loses its aria-label. Restore it.
3. Try again button removed — error state now has no manual retry. Restore it.
4. Missing EOF newlines on DashboardHeader.tsx and TopRepos.tsx.
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Two issues:
-
Missing EOF newline — add trailing newlines to all modified files.
-
Raw Tailwind color —
text-center py-6 text-sm text-red-500uses a hardcoded Tailwind color. Replacetext-red-500withtext-[var(--destructive)]so it works in both light and dark themes.
|
This PR has merge conflicts with |
Added an empty state UI for TopRepos when no repositories are available.
Changes made:
Added folder icon
Added "No repositories found" title
Added helpful description message
Matches existing dashboard card styling
Works in light/dark mode
Fixes #55