Icinga / icinga-notifications-web

Icinga Notifications Web — Manage incidents and who gets notified about them how and when
GNU General Public License v2.0
11 stars 0 forks source link

Desktop notifications: ask for notification permission only when saving the form #247

Open julianbrost opened 2 months ago

julianbrost commented 2 months ago

When enabling the desktop notifications in the user settings, the site asks for the notification permission immediately. However, to actually enable the feature, you still have to save the updated settings. I failed to do so for the second time now because asking for the permission felt like the feature was already activated and I continued without explicitly saving and wondered why it didn't work. I think this could be improved by simply delaying the permission request until the save button is clicked (or maybe until the next page is loaded where it actually subscribes to the event stream).

nilmerg commented 2 months ago

and I continued without explicitly saving and wondered why it didn't work

Interesting. Why If I may ask? I'd expect that in a form the user is familiar with, any change is saved or otherwise the user is aware that it is not effective.

or maybe until the next page is loaded where it actually subscribes to the event stream

That's not possible. Browsers require user input in order to ask for the permission.

julianbrost commented 2 months ago

and I continued without explicitly saving and wondered why it didn't work

Interesting. Why If I may ask? I'd expect that in a form the user is familiar with, any change is saved or otherwise the user is aware that it is not effective.

Is there any other situation in Icinga Web where you click a checkbox and then a browser permission request appears? I wouldn't say users are familiar with that and it deviates quite a bit from the regular filling out form fields and then submitting the form flow. I didn't consciously decide against clicking the save button, seeing the permission request felt like a confirmation of my action and I didn't see a need to do anything more.