feat(dashboard): add reusable empty state components for widgets - #3235
Conversation
…racking # Conflicts: # src/components/GoalTracker.tsx
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
|
The idea here is in scope and worth having — DevTrack does want consistent empty states, and the docs really should say pnpm rather than npm. The problem is the branch, not the intent. This branch is stacked on your task-management work, so it carries all of that too: To move it forward: git checkout main && git pull
git checkout -b feat/empty-states-clean
# re-apply only the EmptyState workA PR touching Leaving this open so you can force-push a clean branch to it if you'd rather not open a new one. |
Summary
Replaces ad-hoc blank state messages across various dashboard widgets with the unified
EmptyStatecomponent for a more consistent, informative, and engaging user experience.Closes #2646
Type of Change
Description
Several dashboard widgets previously displayed blank sections or minimal placeholder text when no data was available. This update standardizes these edge cases using the reusable
EmptyStatecomponent.Changes made:
EmptyState.tsx: Added anonActionprop to support action buttons alongside the existingactionHreflink support.TopRepos.tsx(Repositories Widget): ImplementedEmptyStatefor when a user has no pinned or top repositories found.PRReviewTrendChart.tsx(PR Analytics Widget): Replaced the standard border box empty state withEmptyStateand an action to view their GitHub profile.RecentActivity.tsx(Activity Widget): Updated to useEmptyStatewith a directonActionbutton that refreshes the activity feed.EmptyStateeffectively.Testing
actionHreflinks point correctly.onActioncorrectly fires reload functions on empty states.pnpm typecheck) seamlessly without type errors.