Peer Mentor Confirmation Banner
Component Detail
Description
Inline confirmation banner shown to the peer mentor on both pause activation and deactivation transitions. Confirms the state change was recorded, displays the effective date, and dismisses automatically after a short delay. Reuses the app's standard toast/banner infrastructure.
peer-mentor-confirmation-banner
Summaries
The Peer Mentor Confirmation Banner provides immediate, unambiguous feedback to peer mentors confirming that their pause or resume request was successfully recorded by the system. This seemingly small interaction has significant trust implications — without clear confirmation, peer mentors may submit duplicate requests, contact coordinators unnecessarily, or lose confidence in the platform's reliability. By reusing the app's existing toast infrastructure, the organization delivers this assurance at minimal development cost while reinforcing a consistent, professional user experience that builds long-term platform trust.
This is a low-complexity, low-risk component that reuses the application's existing toast or banner infrastructure, meaning no new UI primitives need to be built. The primary requirement is confirming the correct toast component API and ensuring the effective date formatting matches the app's established date display conventions. Development effort is minimal — the main implementation tasks are wiring the `showPauseConfirmation` and `showResumeConfirmation` calls into the pause/resume workflow completion handlers, and configuring the auto-dismiss timer. Testing should verify both confirmation variants, correct date display, and that auto-dismiss fires reliably without memory leaks.
This component wraps the existing app-level toast or snackbar service, exposing two typed trigger methods. `showPauseConfirmation(effectiveDate)` and `showResumeConfirmation(effectiveDate)` should format the date using the shared date formatting utility and inject it into the appropriate localized message string. The `dismiss()` method should cancel any in-flight auto-dismiss timer and imperatively remove the banner from the overlay stack. Auto-dismiss duration should be sourced from app-level constants (typically 3–5 seconds) rather than hardcoded.
Since this reuses existing infrastructure, ensure the call site passes the correct banner variant identifier so the toast service applies the appropriate icon and color. No state management beyond transient display state is needed.
Responsibilities
- Confirm pause activation to the peer mentor with effective date
- Confirm resume activation to the peer mentor
- Auto-dismiss after display timeout
Interfaces
showPauseConfirmation(effectiveDate: DateTime)
showResumeConfirmation(effectiveDate: DateTime)
dismiss()