Pause Confirmation Dialog
Component Detail
Description
Modal dialog that prompts the peer mentor to confirm a pause action and optionally provide a reason. Communicates that the coordinator will be notified and that they will no longer appear in assignment pools.
pause-confirmation-dialog
Summaries
The Pause Confirmation Dialog is a safeguard that ensures mentors make an informed, intentional decision before pausing their availability. By surfacing the consequences — removal from assignment pools and coordinator notification — before the action completes, the organization reduces accidental pauses that could disrupt program operations. This small interaction detail protects program continuity, builds mentor trust through transparency, and reduces coordinator workload caused by unintended status changes that require manual correction. The optional reason field also provides coordinators with context, enabling faster and more empathetic follow-up with mentors who need support.
A low-complexity mobile modal with no external dependencies, making it one of the safest deliverables in the mentor status feature. The component is self-contained: it shows consequences, collects an optional reason string, and emits a confirmed or cancelled outcome. Testing requirements include UI rendering, cancel/confirm tap handling, optional text field validation, and submitting state display. Since this component is a dependency for the Pause/Reactivate Toggle, it should be prioritized early in the sprint.
No backend integration required at this layer — all state is passed in and out via callbacks. Low risk, short cycle time.
A modal dialog widget exposing `show(context: BuildContext)`, `onConfirm(reason: String?)`, `onCancel()`, and `setSubmitting(bool)`. Has zero external dependencies, making it straightforward to test in isolation. The dialog should be presented using the platform's native modal route to ensure correct back-navigation behavior. The optional reason field is a plain text input — no validation required beyond trimming whitespace before passing to the caller.
The `setSubmitting` state should disable both confirm and cancel buttons and show a loading indicator to prevent double-submission. Emit results via callbacks rather than returning a Future to keep the API consistent with the rest of the dialog pattern in this codebase.
Responsibilities
- Display clear consequences of pausing (hidden from assignments, coordinator notified)
- Collect optional pause reason from mentor
- Emit confirmed or cancelled outcome to caller
Interfaces
show(context: BuildContext)
onConfirm(reason: String?)
onCancel()
setSubmitting(bool)