Scenario Prompt Detail Bottom Sheet
Component Detail
Description
Modal bottom sheet presented when a peer mentor taps a scenario prompt. Shows full context including the triggering activity summary, the suggested action, and relevant wellbeing flags from the previous report. Includes primary action button that launches the activity wizard with pre-filled data.
scenario-prompt-detail-sheet
Summaries
The Scenario Prompt Detail Bottom Sheet is the moment-of-action interface for peer mentors — it surfaces the right context at the right time, reducing the cognitive load required to act on a support prompt. By presenting the triggering activity summary, wellbeing flags, and a single clear call-to-action, the sheet removes friction from the support workflow and increases the likelihood that mentors follow through with meaningful outreach. Higher mentor response rates translate directly into better member outcomes, stronger programme retention, and a measurable improvement in the organisation's value proposition to both members and institutional sponsors.
This medium-complexity mobile UI component depends on scenario-deep-link-handler to receive and parse prompt data before presentation. Development can proceed in parallel with the deep-link handler, but end-to-end testing requires the handler to be complete. Key delivery risks include variability in prompt payload structure if upstream data models evolve, and edge cases where referenced activity or wellbeing flag data is incomplete or null. QA should cover empty-state rendering, pre-fill argument accuracy when launching the activity wizard, and correct dismiss behaviour.
The sheet must also be tested across device sizes given modal bottom sheet constraints on smaller screens.
ScenarioPromptDetailSheet is a modal bottom sheet widget that receives a ScenarioPrompt object as a required constructor argument. It delegates context rendering to buildActivityContext(), which formats the triggering Activity, and buildWellbeingFlagsSummary(), which maps the flags string list to readable UI chips. onPrimaryAction() constructs the pre-fill argument map from prompt.preFillData and uses scenario-deep-link-handler's navigation contract to push the activity wizard route. onDismiss() pops the sheet and should clear any ephemeral prompt-viewed state if tracking is required.
All nullable fields on ScenarioPrompt and Activity must be handled defensively to prevent null dereference errors in edge-case payloads.
Responsibilities
- Display full prompt context and triggering activity details
- Render wellbeing flags from the associated report if present
- Offer primary action (open wizard) and secondary dismiss action
- Pass pre-fill arguments to activity wizard on action
Interfaces
ScenarioPromptDetailSheet({required ScenarioPrompt prompt})
buildActivityContext(Activity activity)
buildWellbeingFlagsSummary(List<String> flags)
onPrimaryAction()
onDismiss()
Relationships
Related Data Entities (2)
Data entities managed by this component