chore: add call-to-action links in zero-state stats cards (#162) #179
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Relates to #162
Severity: Minor
Problem
"Upcoming Maintenance: 0" and "Recent Fuel Logs: 0" are dead-end cards. They don't invite the user to take action.
Recommendation
Add a subtle link like "Schedule maintenance" or "Log your first fill-up" within the zero-state card.
Acceptance Criteria
Implementation Plan (from #162 -- Milestone 10)
Phase: 4 (Dashboard improvements) | Priority: Minor | Depends on: None | Blocks: None
Context
When dashboard stats cards show zero values, there is no guidance for new users on what to do next. Adding call-to-action links provides an onboarding path.
Implementation
1. Update
frontend/src/features/dashboard/components/SummaryCards.tsx:Add an optional navigation callback prop:
2. Card-to-route mapping (when value is 0):
/garage/vehiclesVehicles/garage/maintenanceMaintenance/garage/fuel-logsLog Fuel3. Rendering logic:
<Link>componentonNavigate(screen)prop4. Parent wiring in
DashboardScreen.tsx:onNavigateprop toSummaryCardsin mobile mode, mapping screen names to ZustandnavigateToScreen()callsFiles
frontend/src/features/dashboard/components/SummaryCards.tsxfrontend/src/features/dashboard/components/DashboardScreen.tsx(pass onNavigate prop)Commit Convention
Test Criteria
Branch
Work on branch
issue-162-ux-design-audit-cleanup(shared with all #162 sub-issues)Milestone: Implementation Complete
Phase: Execution | Agent: Developer | Status: PASS
Changes
SummaryCards.tsx:onNavigateoptional prop for screen navigationctaTextandctaScreenfields to each card configDashboardScreen.tsx:onNavigateprop through toSummaryCardsVerification
onNavigateis optional so existing usages are unaffectedaccb053on branchissue-162-ux-design-audit-cleanupVerdict: PASS | Next: Visual verification on mobile and desktop viewports