Vés al contingut principal

Configuració de les galetes

Fem servir galetes per assegurar les funcionalitats bàsiques del lloc web i per a millorar la teva experiència en línia. Pots configurar i acceptar l'ús de galetes, i modificar les teves opcions de consentiment en qualsevol moment.

Essencials

Preferències

Analítiques i estadístiques

Màrqueting

Aquesta proposta ha sigut implementada

  • Reviewed by @product and accepted in the main project
  • It is funded by Barcelona City Council
  • Developed by Populate
  • Available in release 0.27 via #8774

Ask permission to client for Push Notifications

Avatar: InnovacióDemocràtica
InnovacióDemocràtica
Finalitzada

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


Comentari

Confirmar

Si us plau, inicia la sessió

La contrasenya és massa curta.

Compartir