Changes at "Ask permission to client for Push Notifications"
Body (English)
-
+
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
Title (English)
- +Ask permission to client for Push Notifications