Skip to content

Add empty state UI for TopRepos when no repositories found#89

Closed
nangaretejal991-bit wants to merge 4 commits into
Umbrella-io:mainfrom
nangaretejal991-bit:pr/66
Closed

Add empty state UI for TopRepos when no repositories found#89
nangaretejal991-bit wants to merge 4 commits into
Umbrella-io:mainfrom
nangaretejal991-bit:pr/66

Conversation

@nangaretejal991-bit

Copy link
Copy Markdown

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

@vercel

vercel Bot commented May 15, 2026

Copy link
Copy Markdown

@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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Priyanshu-byte-coder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Priyanshu-byte-coder added type:feature GSSoC type bonus: new feature level:beginner GSSoC: Beginner difficulty (20 pts) gssoc26 GSSoC 2026 contribution labels May 15, 2026

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 changes

The 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.

@Priyanshu-byte-coder

Copy link
Copy Markdown
Member

Hi @nangaretejal991-bit — this PR has a merge conflict with main in TopRepos.tsx (several sort/link features have been merged since your branch was created). Please rebase:

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-lease

Once rebased, we'll review and merge.

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Priyanshu-byte-coder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two issues:

  1. Missing EOF newline — add trailing newlines to all modified files.

  2. Raw Tailwind colortext-center py-6 text-sm text-red-500 uses a hardcoded Tailwind color. Replace text-red-500 with text-[var(--destructive)] so it works in both light and dark themes.

@Priyanshu-byte-coder Priyanshu-byte-coder added the gssoc:approved GSSoC: PR approved for scoring label May 24, 2026
@Priyanshu-byte-coder

Copy link
Copy Markdown
Member

This PR has merge conflicts with main. Please rebase on the latest main branch and re-request review.

@github-actions github-actions Bot added the type:design GSSoC type bonus: UI/design (+10 pts) label May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC: PR approved for scoring gssoc26 GSSoC 2026 contribution level:beginner GSSoC: Beginner difficulty (20 pts) type:design GSSoC type bonus: UI/design (+10 pts) type:feature GSSoC type bonus: new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GOOD FIRST ISSUE] Add 'No data' empty state to TopRepos when repos list is empty

3 participants