Complete Multi-Step Activity Registration Wizard
The Activity Wizard Screen implements a multi-step registration flow using BLoC for step state management and GoRouter nested navigation within StatefulShellRoute to preserve the back-stack correctly across steps. The wizard steps are: (1) contact selection, (2) date, (3) time, (4) duration, (5) summary/notes. Pre-filled defaults (today's date, 30-minute duration, last-used activity type) are fetched from Supabase on wizard launch via the Activity Registration Service. Each step validates input before allowing advancement — the Activity Validation Service enforces required fields, date/time constraints, duration ranges, and contact association requirements. Inline field-level validation feedback is displayed for errors rather than blocking with modal dialogs. The wizard supports partial saves so an interrupted registration can be resumed later. Back navigation uses a back button (not swipe gestures) per WCAG cognitive accessibility recommendations. All fields have semantic labels for screen reader compatibility and contrast ratios exceed 4.5:1.
User Story
Acceptance Criteria
- Given the user has selected an activity type, when the wizard launches, then steps 1–5 are presented sequentially with a visual step progress indicator showing current position
- Given the wizard has launched, when default values are available in Supabase for the authenticated user, then the date field pre-fills with today's date and the duration field pre-fills with the user's stored default (e.g., 30 minutes)
- Given the user is on a wizard step and taps 'Next', when required fields on that step are incomplete or invalid, then the Activity Validation Service returns structured errors displayed inline at the field level without navigating away
- Given the user is on any wizard step, when they tap the back button, then the previous step is restored with all previously entered data intact
- Given the user interrupts registration (e.g., switches app or closes it), when they return and attempt to register a new activity, then the system offers to resume the saved draft
- Given a screen reader user navigates the wizard, when each form field is focused, then a semantic label is announced by the screen reader and all tap targets meet 44×44 dp minimums
- Given the user completes all five wizard steps, when they tap 'Next' on the final step, then the Activity Summary Screen is displayed for review before submission
Business Value
The multi-step wizard is the core interaction of the highest-priority feature across all three organizations. HLF documented one peer mentor with 380 individual registrations in a single year — every second of friction at this step multiplies into hours of lost volunteer time annually. Pre-filled defaults eliminate repetitive data entry for the 60–70% of registrations with no expense component. Step-by-step validation prevents submission of incomplete data that would corrupt Bufdir grant reporting.
WCAG 2.2 AA compliance ensures accessibility for peer mentors with motor, cognitive, and sensory impairments.
Components
- Activity Wizard Screen ui
- Activity Registration Service service
- Activity Validation Service service
- Activity Repository data
- Activity Types Store data