[FEAT] Add reusable empty states to dashboard widgets #2646#2693
Conversation
GSSoC Label Checklist 🏷️@Umbrella-io — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
|
Thanks for contributing! We are currently in a code cleanup sprint and not accepting new features. Please see: #2651 This PR will be revisited once the sprint ends. In the meantime, tests, refactors, bug fixes, and documentation are welcome. |
|
New UI/feature PRs are on hold during the code quality sprint — see discussion #2651. PRs for tests, refactoring, bug fixes, docs, and performance are welcome. |
|
On hold — new features are not being merged during the code quality sprint. See discussion #2651. |
|
New feature/UI PRs are on hold during the code-quality sprint — see discussion #2651. We'll revisit after the sprint; tests, refactors, and bug-fix PRs are the priority right now. |
|
Two problems: EmptyState (py-20 + 6xl icon ≈ 400px tall) is placed inside the PR chart's h-[200px] container, so it overflows its card; and TopRepos' CTA changed from 'Create Repository' (useful for zero-repo users) to 'Refresh Data' (refreshing won't help them). Please add a compact variant of EmptyState for tight containers and keep the create-repo action. |
|
This is the version of the empty-state work I want to keep — it actually extends the shared |
2a8148b to
7624eac
Compare
… for stargazers API
|
@Umbrella-io team I've already starred the repo but still showing require star to contribute |
Problem Statement
Several dashboard widgets previously displayed blank sections, empty tables, or minimal placeholder text when no data was available. This created an inconsistent user experience and offered no clear next steps.
Proposed Solution
This PR addresses issue #2646 by enhancing the shared
EmptyStatecomponent and implementing it across all relevant dashboard widgets to provide consistent, actionable guidance when data is unavailable.Changes Made
EmptyStateComponent: Modifiedsrc/components/EmptyState.tsxto support interactive buttons via anactionOnClickprop andReact.ReactNodeicons.GoalTracker.tsx): Updated the existing empty state to match the new standard ("No goals created yet" -> "Create Goal" action).TopRepos.tsx): Replaced the manual placeholder UI with the newEmptyStatecomponent ("No repositories found" -> "Refresh Data" action viafetchRepos).PRBreakdownChart.tsx): Replaced simple paragraph text with theEmptyStatecomponent ("No pull requests available" -> "View GitHub Profile" action).src/app/leaderboard/page.tsx): Implemented a fallback empty state ("No leaderboard data available" -> "Sync Dashboard" action) when data fails to load.Impact
These changes ensure a premium and consistent design language across the dashboard, reducing user confusion and providing clear, actionable next steps when encountering empty data states.