Feature request: desktop notifications
-
Behind a preference, of course.
-
@marczellm It looks like it asks once and then after that you can change the setting in your profile. Seems reasonable.
-
@ben_lubar Doesn't NodeBB like stop updating after 5 minutes anyway? Not sure how this would be useful unless you were interacting with the site actively, in which case you don't need them.
-
The toaster isn't very friendly.
It will stay open until you activate desktop notifications, while giving no indication that you can deactivate them later.
-
@coldandtired said in Feature request: desktop notifications:
The toaster isn't very friendly.
It will stay open until you activate desktop notifications, while giving no indication that you can deactivate them later.
You can dismiss the toaster and it won't come back up.
-
@ben_lubar Only by clicking to grant permission.
-
@coldandtired said in Feature request: desktop notifications:
@ben_lubar Only by clicking to grant permission.
No, all NodeBB notifications have an X you can click.
-
@ben_lubar Maybe it's Opera then?
-
@coldandtired Might be. The 'X' appears on Vivaldi.
-
Now, if the desktop notifications actually did anything when I clicked on them...
(do the in-page notification toasters still trigger a full load, instead of ajaxy navigation? I never click them because they trigger a full load... oh, and they don't get marked read if you click the toaster, either.)
Actually, at one point I was going to make my userscript move all of the toasters into HTML5 desktop notifications, and I did write a script that would do that, but it was pretty fucking pointless since the notification onclick function was still the one that NodeBB provided, which triggered a full load and didn't even mark the notification read when you clicked it.
It's almost as stupid as the Facebook desktop notifications for messenger, which trigger a full load of Facebook with the Messenger open to that conversation in a new tab instead of just focusing the Facebook tab that's already open and popping up the chat if it's not already.
-
Fuck you whoever requested this, and double for whoever implemented it. Now I have to say "no" on every fucking device. Even my phone which isn't a desktop. And when I clicked X for no, it STILL tries to do desktop notifications, so I have to say no on browser.
Fucking HELL.
-
@lorne-kates said in Feature request: desktop notifications:
when I clicked X for no, it STILL tries to do desktop notifications, so I have to say no on browser
Really? When I did that on my phone, it just made another toaster appear that said they were disabled and that I could go to my account settings if I wanted to change it.
-
@erufael It turned out to be the theme (Paper), which hid the 'x' on every browser.
-
@anotherusername said in Feature request: desktop notifications:
@lorne-kates said in Feature request: desktop notifications:
when I clicked X for no, it STILL tries to do desktop notifications, so I have to say no on browser
Really? When I did that on my phone, it just made another toaster appear that said they were disabled and that I could go to my account settings if I wanted to change it.
Well, yes. I click the "x" on the orange toaster requesting permissions and a grey toaster appears saying it's been disabled. But this happens again on every single tab I open.
-
@topspin huh. Is your browser preventing WTDWTF from storing anything in
localStorage
or something...? It should be settinglocalStorage["plugins:desktop_notifications.ignore"]
.
-
@anotherusername
I don't know, I'm using Firefox in private browsing mode but I don't remember if I set any special option to prevent local storage. The user settings, which I presume are stored server side, work fine though.Maybe a restart of everything will help.
-
@topspin said in Feature request: desktop notifications:
private browsing mode
That'd probably do it.
-
@anotherusername I restarted the browser. I got another orange toaster at first, which I dismissed, and upon opening a new tab that showed the toaster again. Strangely enough I'm not getting any toasters on new tabs right now, though.
It's also easy to slightly miss the dismiss "x" so that instead of the grey toaster I get a request from Firefox asking if I should allow notifications.And the FF settings page tells me that WTDWTF has doesn't have anything stored locally. Probably either due to private mode or tracking protection (which defaults to on in private mode).
-
@topspin I'm pretty sure a brand-new, empty, private
localStorage
is created when you enter private mode, and it's destroyed as soon as your last private window or tab is closed. Cookies are handled the same way. So basically, when you enter private mode, you should have to log in and dismiss the notification prompt, and then new tabs should still have your session andlocalStorage
settings.Maybe if you opened multiple tabs before you dismissed the orange notification permission toaster, you'd have the toaster on all of the tabs, and since the toaster doesn't go away until it's dismissed, you'd have to either dismiss it on each tab separately, or refresh all of the tabs after dismissing it on one of them.
-
@anotherusername Sounds reasonable.
Am I mistaken in that other profile settings (e.g. delay image loading) are stored server side?
-
@topspin Most of the settings are stored server-side, yes. The one to enable desktop notifications is stored in local storage, since the notification API permission is also stored locally. Besides, you might want desktop notifications on some devices and not on others, so it makes sense.
-
@anotherusername said in Feature request: desktop notifications:
@lorne-kates said in Feature request: desktop notifications:
when I clicked X for no, it STILL tries to do desktop notifications, so I have to say no on browser
Really? When I did that on my phone, it just made another toaster appear that said they were disabled and that I could go to my account settings if I wanted to change it.
That's what it did on my desktop(s), but not on my phone. If it's because the "X" is a 5px by 5px target ontop of a toaster that is 200px x 200px-- and the toaster itself is a "YES SPAM ME" hyperlink, then triple fuck you to whoever designed it that way.
-
@e4tmyl33t said in Feature request: desktop notifications:
@topspin said in Feature request: desktop notifications:
private browsing mode
That'd probably do it.
WHY IS THIS NOT SET ON THE ACCOUNT LEVEL AND STORED ON THE SERVER FUCKING HELL!
-
@anotherusername said in Feature request: desktop notifications:
@topspin Most of the settings are stored server-side, yes. The one to enable desktop notifications is stored in local storage, since the notification API permission is also stored locally. Besides, you might want desktop notifications on some devices and not on others, so it makes sense.
Seems reasonable to me.
-
@lorne-kates said in Feature request: desktop notifications:
@e4tmyl33t said in Feature request: desktop notifications:
@topspin said in Feature request: desktop notifications:
private browsing mode
That'd probably do it.
WHY IS THIS NOT SET ON THE ACCOUNT LEVEL AND STORED ON THE SERVER FUCKING HELL!
I like desktop notifications on desktop, but not on mobile.
-
@anotherusername said in Feature request: desktop notifications:
I like desktop notifications on desktop, but not on mobile.
Well I never want them and never want to be asked for them ever. So there should be a server-side "TURN IT OFF ALL THE TIME" flag.
-
@lorne-kates said in Feature request: desktop notifications:
Well I never want them and never want to be asked for them ever.
You are in for a life of disappointment.
-
@boomzilla said in Feature request: desktop notifications:
@lorne-kates said in Feature request: desktop notifications:
Well I never want them and never want to be asked for them ever.
You are in for a life of disappointment.
No, because I can tell my browser "No, never fucking every show them to me and don't even ask me ever."
But NodeBB decided to be a and do notification requests it's own special way, so now there's going to be a fucking popup on every goddamn device forever.
-
@lorne-kates said in Feature request: desktop notifications:
NodeBB decided to be a and do notification requests it's own special way, so now there's going to be a fucking popup on every goddamn device forever.
Unless you're using private mode, you should only get the popup once per device.
If you are using private mode, I'm not sure it would remember that you had previously denied the site permission on the normal API, anyway.
-
@anotherusername said in Feature request: desktop notifications:
should
You say that word like NodeBB knows what it is.
-
@anotherusername said in Feature request: desktop notifications:
If you are using private mode, I'm not sure it would remember that you had previously denied the site permission on the normal API, anyway.
True unless it's configured to default deny everything with prejudice. And I'm sure that's what Lorne's talking about,
-
@topspin if Lorne's browser does not behave the way he wants it to when sites attempt to access built-in APIs, that falls squarely in "not NodeBB's fault" territory.
-
@anotherusername No, as far as I understand, NodeBB asks the user for permission (the orange toaster) first before even requesting access to the browser API. That part the browser knows nothing about. If, on the other hand, NodeBB just tried to access the API without the orange toaster, the browser could handle it however it's configured, i.e. ask the user, default allow, or default deny.
-
@topspin NodeBB does check that
Notification
exists before it shows the orange toaster, though. I guess it could go one step further and verify thatNotification.permission
isn't alreadydenied
, but really... the simplest way for a browser to indicate that desktop notifications are not available (and requesting permission won't even do anything) would be to simply not give the script aNotification
object in the first place.
-
@anotherusername I'm not at all familiar with these things, but it does look to me like not giving a valid object, and giving a valid object that would say "fuck you", are not at all the same thing, from the point of view of the website that requests it. In one case it's "too bad your browser doesn't support notifications, here is what you are missing..." and in the other it's "um, ok, so this guy knows what notifications are and he explicitly turned them off, maybe we should
bugger him until he turns them back onpolitely accept that".(and if, as you say, the object already has a
permission
field, it looks to me like this means the browser devs already thought of that distinction and use it in this way, so it's kind of rude from NodeBB's part to ignore that?)In any case, it does seem weird to me that there is a built-in mechanism, and that nonetheless NodeBB decides to not use it and add its own layer (before passing it on to the built-in one). This reeks of the usual web-dev cancer of "let's reimplement stuff that browsers can do, so that we can do it badly, while adding our own
bugsfeatures".
-
@anotherusername said in Feature request: desktop notifications:
@topspin if Lorne's browser does not behave the way he wants it to when sites attempt to access built-in APIs, that falls squarely in "not NodeBB's fault" territory.
Um, yes it is. Because any site that uses the API correctly will be denied outright, and will never show a message.
NodeBB, on the other hand, decides to pop up IT'S OWN UI first saying "wanna do teh desktopz?". That is before it even touches the API.
If they really wanted to be , then it should be:
if (fuckingBrowserAPI.DesktopShit.IsAllowed) { if(ShowThisFuglyPopupConfirm()} { AskForDesktopPermission(); } }
Rather than
if(ShowThisFuglyPopupConfirm()} { AskForDesktopPermission(); }
-
I've escalated this with @psychobunny for his thoughts. I personally don't see why we need to ask for permission to allow the browser to ask for permission.
-
@julianlam Thank You!
-
@julianlam said in Feature request: desktop notifications:
I've escalated this with @psychobunny for his thoughts. I personally don't see why we need to ask for permission to allow the browser to ask for permission.
I can tell you one reason but it's a bug in Chrome.
If you load a site by pasting in a URL, the URL bar is selected. If the site then requests notifications, the URL bar becomes de-selected despite the user taking no action. If the page loader then hits the Copy shortcut to send the link to a buddy, it does nothing because the URL bar is no longer selected and then I paste the wrong embarrassing link.
Frankly my preference is that the entire concept that websites should be able to send notifications is moronic. If you want UI conveniences like that, use a UI framework that doesn't suck shit in the first place. It's obvious Chrome never put any attention into how fucking annoying the whole implementation of notifications is.
Also I'm still bitter because Chrome introduced the feature without doing ANY TESTING WHATSOEVER, and whenever you got a notification it'd minimize your full-screen game because FUCK USERS that's the open source way: FUCK USERS. I don't care if they work better now, the first version was SO SHITTY it's forever burned that bridge for me.
-
@blakeyrat said in Feature request: desktop notifications:
and whenever you got a notification it'd minimize your full-screen game because FUCK USERS that's the open source way
Hmm...how is that even possible?! By which I mean, why does windows allow that? Did they not test this stuff?
-
@boomzilla said in Feature request: desktop notifications:
By which I mean, why does windows allow that?
Windows used to be built with the assumption that application developers were not incompetent idiots. Unfortunately, a lot of that code still exists in Windows. Which is why an application can force user focus to a window and as a side-effect minimize their full-screen game.
-
@blakeyrat Well, then I can certainly understand why you'd blame Chrome for that.
-
@boomzilla said in Feature request: desktop notifications:
Well, then I can certainly understand why you'd blame Chrome for that.
The bug was not Chrome's fault, but it was still Chrome's problem.
-
@blakeyrat Uh huh.
-
@julianlam said in Feature request: desktop notifications:
I personally don't see why we need to ask for permission to allow the browser to ask for permission.
Because all the cool
kidsapps do it?Off the top of my head, those that pop an in-page question about it:
- Discord
- Slack
- HipChat
- YouTube
- (Facebook? Can't confirm, haven't logged in in a while)
- Gmail
...
-
When i have two tabs open i get each notofication twice, i presume this is unintended.
Is there any way to fix it @ben_lubar ?
-
@tsaukpaetra said in Feature request: desktop notifications:
(Facebook? Can't confirm, haven't logged in in a while)
They used to. The recommendation I saw to get the shit to shut up was to tell FB yes, then tell the browser where it can shove those notifications.
-
@dcon said in Feature request: desktop notifications:
The recommendation I saw to get the shit to shut up was to tell FB yes, then tell the browser where it can shove those notifications.
That's what I always do. "Nod and smile... DENIED!!"
-
@julianlam said in Feature request: desktop notifications:
I've escalated this with @psychobunny for his thoughts. I personally don't see why we need to ask for permission to allow the browser to ask for permission.
FUCK YOU.
Wait, sorry trigger reply.
Umm FF... FFFFft... th... thuk you? nonon... th--a a-- aaaah. thank you?
weird.
-
@tsaukpaetra said in Feature request: desktop notifications:
Off the top of my head, those that pop an in-page question about it:
And I'm sure all of those ask once, get the reply, and save the value to your user profile.
And since all those sites (except GooTube) REQUIRE a login to access functionality, that value will always be available.
I assume GooTube just bugs you to log in, and when you do, it uses the value.