- Implemented UiShimmer as a core shimmer wrapper for animated gradient effects. - Created shimmer presets for list items, stats cards, section headers, and more. - Developed specific skeletons for billing, invoices, coverage, hubs, reports, payments, shifts, and home pages. - Enhanced user experience by providing visual placeholders during data loading.
2.9 KiB
2.9 KiB
Mobile Builder Agent Memory
Design System - Shimmer Primitives
- Shimmer widgets are in
packages/design_system/lib/src/widgets/shimmer/ - Available:
UiShimmer,UiShimmerBox,UiShimmerCircle,UiShimmerLine,UiShimmerListItem,UiShimmerStatsCard,UiShimmerSectionHeader,UiShimmerList UiShimmerList.itemBuildertakes(int index)-- single parameter, not(BuildContext, int)UiShimmerBox.borderRadiusacceptsBorderRadius?(nullable), usesUiConstants.radiusMdas default- All shimmer shapes render as solid white containers; the parent
UiShimmerapplies the animated gradient - Exported via
design_system.dartbarrel
Staff App Feature Locations
- Shifts:
packages/features/staff/shifts/-- has ShiftsPage (tabbed: MyShifts/Find/History) + ShiftDetailsPage - Home:
packages/features/staff/home/-- WorkerHomePage with sections (TodaysShifts, TomorrowsShifts, Recommended, Benefits, QuickActions) - Payments:
packages/features/staff/payments/-- PaymentsPage with gradient header + stats + payment history - Home cubit:
HomeStatusenum (initial, loading, loaded, error) - Shifts bloc:
ShiftsStatusenum + sub-loading flags (availableLoading,historyLoading) - Payments bloc: uses sealed state classes (
PaymentsLoading,PaymentsLoaded,PaymentsError)
UiConstants Spacing Tokens
- Use
UiConstants.space1throughUiConstants.space24for spacing - Radius:
UiConstants.radiusSm,radiusMd,radiusLg,radiusFull,radiusBase,radiusMdValue(double) UiConstants.radiusFullis aBorderRadius,UiConstants.radiusMdValueis adouble
Barrel Files (Staff Features)
- Shifts:
lib/staff_shifts.dartexports modules only - Payments:
lib/staff_payements.dart(note: typo in filename) exports module only - Home:
lib/staff_home.dartexports module only - These barrel files only export modules, not individual widgets -- skeleton widgets don't need to be added
Client App Feature Locations
- Coverage:
packages/features/client/client_coverage/ - Home:
packages/features/client/home/(no loading spinner -- renders default data during load) - Billing:
packages/features/client/billing/(billing_page, pending_invoices_page, invoice_ready_page) - Reports:
packages/features/client/reports/(reports_page with metrics_grid, plus 6 sub-report pages) - Reports barrel:
widgets/reports_page/index.dart - Hubs:
packages/features/client/hubs/(client_hubs_page + hub_details_page + edit_hub_page)
Key Patterns Observed
- BenefitsOverviewPage also has CircularProgressIndicator (not shimmer-ified yet)
- ShiftDetailsPage has a dialog-level spinner in the "applying" dialog -- this is intentional, not a page loading state
- Hub details/edit pages use CircularProgressIndicator as action overlays (save/delete) -- keep as-is, not initial load
- Client home page has no loading spinner; it renders with default empty dashboard data