-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faster desktop notifications #2955
Faster desktop notifications #2955
Conversation
…plemented setTimeout to close notification after that duration.
@mccambridge Are you using OS X? I think that this remove the notification from the notification central. |
@rodrigok Yes, I'm on OS X. I don't think these notifications add anything to notification central. These are just pop-up desktop notifications as far as I can tell. The timeout just closes it. https://developer.mozilla.org/en-US/docs/Web/API/notification |
If you'd like to see a fake notification using the same timeout, you can run:
in a web console. |
@mccambridge Yes, the notifications goes to OS X notification center, see #1866 and #1890 As you can see here https://github.com/RocketChat/Rocket.Chat/pull/1890/files, we removed the close timeout to keep notifications in notification center. |
Okay, got it. Personally, I don't use notification center and would rather not see the notification linger for so long. But that's just my opinion. What do you think about a setting where the administrator could choose whether or not to set the timeout? |
@mccambridge an option of notification timeout is a good idea, 0 could be disabled |
…nto shorter-desktop-notifications
…o not set a timeout
…e/Rocket.Chat into shorter-desktop-notifications
@rodrigok okay, updated to include |
@mccambridge So just to confirm when 0 they will behave as they do currently? |
Exactly. And default is |
LGTM |
@RocketChat/core Someone can review to give the second lgtm? |
LGTM |
Thanks, y'all! |
@RocketChat/core
Adds setting under General -> Notifications to set the number of seconds a desktop notification should appear in the browser (defaults to 5 sec). Currently, Chrome defaults to 20 seconds, and this is somewhat annoying.
Implemented Notification.close() in notifications.coffee in a setTimeout with the duration of the timeout equal to the settings value provided (x1000ms).