Move Zulip's prompt for permission to display notifications to be manually triggered #1189

Open
timabbott opened this Issue Jul 7, 2016 · 0 comments

Projects

None yet

1 participant

@timabbott
Member

As brought up in #883, I think we can probably simultaneously work around the issue there and improve the Zulip user experience by deferring the "allow notifications" popup until after the user has finished the tutorial (it's kinda confusing that it pops up when it does already).

While we're at it, we probably want to make the browser popup be triggered from a message that's part of the Zulip app and explains that notifications are important and the user should accept, to help ensure users don't just auto-block Zulip notifications out of habit.

I think it's definitely possible for a frontend to tell whether notifications have been denied (I'm pretty sure I've seen products display a "you turned off notifications, can you click this?" message). And https://developer.mozilla.org/en-US/docs/Web/API/Notification/permission seems to confirm you can see if they've been explicitly denied.

So a good implementation plan here would be:

  • Build a nice warning message panel (can come down from the top of the center pane) that asks users to enable desktop notifications, and has a button to trigger the prompt for access.
  • Make that warning prompt show up if the user hasn't granted permissions and the tutorial is finished (can probably just use tutorial.defer() to make this code run at the right time)
  • Have a slightly different message for the case that the user has explicitly denied desktop notifications permission.
@timabbott timabbott added this to the Likely next milestone milestone Jul 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment