humhub / fcm-push

Enables your users to receive push notifications from your network.
4 stars 5 forks source link

Implement proper notification permission request #6

Closed buddh4 closed 1 year ago

buddh4 commented 3 years ago

See https://developers.google.com/web/fundamentals/push-notifications/permission-ux

As far as I know most browsers (e.g. Firefox) do not trigger the notification permission request unless the request was triggered by a manual click e.g. in a custom modal. The current behavior (automatically requesting the permission on first page visit even for guest users) will not actually trigger the permission request on such browsers anymore. I think chrome decides if the permission request dialog is triggered depending on how many users declined/approved the permission for a certain site.

In the community this is currently blocked:

Expected behavior Since we also request notification permissions for guests the notificatoin permission request of the browser should be triggered.

Actual behavior Chrome will only render a moving notification icon in the status bar. The permission request is only visible when clicking on the notification icon. (same with firefox)

Possible solution:

This probably also (or only?) needs to be fixed for non push notifications in the core.