Changes at "Ask permission to client for Push Notifications"
Title
- +{"en"=>"Ask permission to client for Push Notifications"}
Body
-
+["
Ref. PWA13.2
NOTE: this feature is from a big development. See PWA discussion at GitHub.
Is your feature request related to a problem? Please describe.
As a participant, I want to be able to give my permission and revoke it.
Describe the solution youâd like
As other apps are abusing the web push API for spamming, what weâll do is to not show it on the first visit, and to not show it even when the participant has first signed in, at least for the moment, as most of the time the participant can have others actions in mind when getting in Decidim (for instance, for verificating herself and making a proposal or a support).
What weâll do is to follow some of the best practices mentioned in Permission UX from Google Web Fundamentals:
- For getting permission for mobile notifications, weâll have an option at our Settings Panel, in more details, it will be in âMy accountâ -> âNotifications settingsâ:
Push notifications
Get push notifications to find out whatâs going on when youâre not on Decidim. You can turn them off anytime.- Participants will be able to revoke this permission
- This setting will only be shown when the server has been configured and the browser client supports Web Push Notifications.
Describe alternatives youâve considered
We could just ask permissions when the first login, but as weâve said thatâs difficult to make it elegant, so weâll just have it in the account settings at the moment.
We could also have a banner (something similar to what we do in A2HS), but at the moment we want to test this feature and see how it works before âpushingâ it to our users (pun intended).
Additional context
As an example of this Permission UX Settings Panel pattern you can see in Twitter:
How this permission gets shown after the setting is checked:
Does this issue could impact on users private data?
It could have some personal data in some notifications (for instance, in the case of Messaging)Acceptance criteria
- Given that Iâm a registered participant and my browser allows push notifications
When I go to âMy accountâ -> âNotifications settingsâ
Then I see a section called âPush notificationsâ
and when I check this setting
Then I get asked for permission to receive Push notifications - Given that Iâm a registered participant and my browser doesnât allow push notifications
When I go to âMy accountâ -> âNotifications settingsâ
Then I donât see the âPush notificationsâ section. - Given that Iâm a registered participant, my browser allows push notifications and Iâve revoked this permission in my browser
When I go to âMy accountâ -> âNotifications settingsâ
Then I see a section called âPush notificationsâ with the following message:
To get notifications from Decidim, youâll need to allow them in your browser settings first.
- Given that Iâm a registered participant, my browser allows push notifications and Iâve accepted the Push notifications
When I go to âMy accountâ -> âNotifications settingsâ
Then I see a section called âPush notificationsâ
and when I uncheck this setting
Then Iâve revoked permission to receive Push notifications
"]
Share