Files
Krow-workspace/.claude/agent-memory/mobile-builder/MEMORY.md
Achintha Isuru 0f0714c55b feat: add shimmer loading skeletons for various pages and components
- 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.
2026-03-10 13:21:30 -04:00

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.itemBuilder takes (int index) -- single parameter, not (BuildContext, int)
  • UiShimmerBox.borderRadius accepts BorderRadius? (nullable), uses UiConstants.radiusMd as default
  • All shimmer shapes render as solid white containers; the parent UiShimmer applies the animated gradient
  • Exported via design_system.dart barrel

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: HomeStatus enum (initial, loading, loaded, error)
  • Shifts bloc: ShiftsStatus enum + sub-loading flags (availableLoading, historyLoading)
  • Payments bloc: uses sealed state classes (PaymentsLoading, PaymentsLoaded, PaymentsError)

UiConstants Spacing Tokens

  • Use UiConstants.space1 through UiConstants.space24 for spacing
  • Radius: UiConstants.radiusSm, radiusMd, radiusLg, radiusFull, radiusBase, radiusMdValue (double)
  • UiConstants.radiusFull is a BorderRadius, UiConstants.radiusMdValue is a double

Barrel Files (Staff Features)

  • Shifts: lib/staff_shifts.dart exports modules only
  • Payments: lib/staff_payements.dart (note: typo in filename) exports module only
  • Home: lib/staff_home.dart exports 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