From a820a7b1319650a9ce4d937e52ef5d8fbc4a9ff8 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Tue, 7 Nov 2023 21:01:37 +0800 Subject: [PATCH] Minor formatting changes --- web-push.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/web-push.md b/web-push.md index a7b3c53..0574edd 100644 --- a/web-push.md +++ b/web-push.md @@ -1,3 +1,6 @@ + +# Overivew of Web Push + Web Push notifications is a web browser messaging protocol defined by the W3C. Discussions of this interesting technology are clouded because of a @@ -360,29 +363,29 @@ unsubscribeFromPush().catch((err) => { NOTE: We could offer an option within the app to "mute" these notifications. This wouldn't turn off the notifications at the browser level, but you could make it so that your Service Worker doesn't display them even if it receives them. -## NOTIFICATION DIALOG WORKFLOW +# NOTIFICATION DIALOG WORKFLOW -# ON APP FIRST-LAUNCH: +## ON APP FIRST-LAUNCH: The user is periodically presented with the notification permission dialog that asks them if they want to turn on notifications. User is given 3 choices: - "Turn on Notifications": triggers the browser's own notification permission prompt. - "Maybe Later": dismisses the dialog, to reappear at a later instance. (The next time the user launches the app? After X amount of days? A combination of both?) - "Never": dismisses the dialog; app remembers to not automatically present the dialog again. -# IF THE USER CHOOSES "NEVER": +## IF THE USER CHOOSES "NEVER": The dialog can still be accessed via the Notifications toggle switch in `AccountViewView` (which also tells the user if notifications are turned on or off). -# TO TEMPORARILY MUTE NOTIFICATIONS: +## TO TEMPORARILY MUTE NOTIFICATIONS: While notifications are turned on, the user can tap on the Mute Notifications toggle switch in `AccountViewView` (visible only when notifications are turned on) to trigger the Mute Notifications Dialog. User is given the following choices: - Several "Mute for X Hour/s" buttons to temporarily mute notifications. - "Mute until I turn it back on" button to indefinitely mute notifications. - "Cancel" to make no changes and dismiss the dialog. -# TO UNMUTE NOTIFICATIONS: +## TO UNMUTE NOTIFICATIONS: Simply tap on the Mute Notifications toggle switch in `AccountViewView` to immediately unmute notifications. No dialog needed. -# TO TURN OFF NOTIFICATIONS: +## TO TURN OFF NOTIFICATIONS: While notifications are turned on, the user can tap on the App Notifications toggle switch in `AccountViewView` to trigger the Turn Off Notifications Dialog. User is given the following choices: - "Turn off Notifications" to fully turn them off (which means the user will need to go through the dialogs agains to turn them back on).