User Interface low complexity mobile
2
Dependencies
0
Dependents
1
Entities
0
Integrations

Description

Per-category opt-in toggle screen allowing users to manage notification fatigue without losing critical alerts. Categories include new assignments, status changes, and approaching deadlines. Settings are persisted per user in Supabase.

Feature: Push Notification Delivery

notification-settings-screen

Summaries

The Notification Settings Screen directly addresses one of the most common causes of mobile app abandonment: notification fatigue. By allowing users to selectively opt into only the notification categories that matter to them — such as new assignment alerts versus general status updates — this component keeps critical communications visible while reducing noise. Users who feel in control of their notification experience are significantly less likely to disable push notifications entirely, preserving the platform's ability to deliver time-sensitive program communications. Persisting preferences in Supabase ensures settings are consistent across device reinstalls and user sessions, protecting the investment made in user onboarding and preference configuration.

Notification Settings Screen is low complexity with two dependencies: notification-preferences-repository and notification-permission-manager. Both are data/service layer components that should be available from the backend integration sprint. The screen itself is a straightforward toggle list with immediate persistence — no complex state machines required. The system permission prompt flow (requesting or redirecting to settings when denied) requires testing across iOS and Android permission models, which differ in UX and re-request behavior.

Ensure the permission-manager abstraction handles both platforms cleanly to avoid platform-specific branching in the UI layer. QA scope: toggle persistence, permission prompt display, denied-state messaging, and preference reload on screen re-entry. Low delivery risk overall.

NotificationSettingsScreen renders a scrollable list of SwitchListTile widgets, one per notification category (new assignments, status changes, approaching deadlines). On toggle, toggleCategory(category, enabled) calls notification-preferences-repository.updatePreference() immediately — no save button, optimistic updates only, with error rollback on failure. loadPreferences() is called in initState or a BLoC's initialization event, populating a Map as the local state model. requestSystemPermission() calls notification-permission-manager which wraps platform-specific permission APIs (permission_handler package recommended).

Display the current permission state at the top of the screen with a conditional banner prompting re-enable if denied. savePreferences() should upsert a single preferences document in Supabase keyed by userId. Ensure the preference model is strongly typed with an enum for NotificationCategory to prevent string-based category mismatches.

Responsibilities

  • Render per-category toggle controls with descriptive labels
  • Persist preference changes immediately to Supabase
  • Show current system permission status with prompt to enable if denied

Interfaces

build()
toggleCategory(category, enabled)
loadPreferences()
savePreferences(preferences)
requestSystemPermission()

Relationships

Dependencies (2)

Components this component depends on

Related Data Entities (1)

Data entities managed by this component