All notification clicks are not created equal
-
When I see a notification and I click on it to pull up the post in question, it's reasonable to assume that I am acknowledging it and want it to no longer show up as an active notification. And in some cases, this is what happens.
Some cases.
- If I click on the faux-notification div box (side note: why does NodeBB have a poorly-implemented, half-functional copy of the Notification API instead of simply using the Notification API?) I get taken to the new post, but it isn't marked as read.
- If I click on it from the menu in the status bar, the notification gets marked as read.
- If I CTRL-click on it, it opens the post in a new tab, and the notification gets marked as read.
- If I click the mouse wheel on it, which is expected to do the same thing as a CTRL-click, it opens the post in a new tab, but the notification does not get marked as read.
In all of these scenarios, the notification should be marked as read. (Also, nod should be using the Notification API.)
-
@masonwheeler yeah, I've always noticed this too...
-
@masonwheeler said in All notification clicks are not created equal:
why does NodeBB have a poorly-implemented, half-functional copy of the Notification API instead of simply using the Notification API?
-
@masonwheeler said in All notification clicks are not created equal:
If I click on the faux-notification div box (side note: why does NodeBB have a poorly-implemented, half-functional copy of the Notification API instead of simply using the Notification API?) I get taken to the new post, but it isn't marked as read.
Because for all of its warts it's probably still better?
-
@RaceProUK said in All notification clicks are not created equal:
@masonwheeler said in All notification clicks are not created equal:
why does NodeBB have a poorly-implemented, half-functional copy of the Notification API instead of simply using the Notification API?
Is anyone still using that?
-
@boomzilla said in All notification clicks are not created equal:
Because for all of its warts it's probably still better?
Not being able to see notifications when I'm not in the tab sending them is better than being able to?
-
Oh, you missed one...
- Clicking anywhere within the notification's
li
element's padding (the shaded purple area around the outside of its box) does not follow the link, but the notification does get marked as read.
Also, that area doesn't have the mouse cursor to indicate that clicking it will do anything.
- Clicking anywhere within the notification's
-
@masonwheeler said in All notification clicks are not created equal:
@boomzilla said in All notification clicks are not created equal:
Because for all of its warts it's probably still better?
Not being able to see notifications when I'm not in the tab sending them is better than being able to?
How do you go back and view them? For me they pop up in a corner of my screen and then they are gone. You really cannot even compare the two things aside from the "notification" part in both of their names.
-
@boomzilla point was, it could use the notification API, instead of the toaster API they built, to pop up the notification message. Everything else would be the same; NodeBB would still track the notifications in the dropdown list and everything.
About the only thing I'd be uncertain about is whether they could easily prevent you getting duplicate notifications if you have the forum open in more than one tab. That would be rather annoying.
-
@boomzilla Uhh... I'm not really sure what you're saying here. Have you used sites that use the HTML Notification API before? Are you familiar with what it is? Because it kind of feels like you're not. The notification popups NodeBB does is obviously an attempt to imitate the Notification API, but (among other things!) it's missing the most important feature: notifications showing up outside the current webpage.
-
@masonwheeler said in All notification clicks are not created equal:
@boomzilla Uhh... I'm not really sure what you're saying here. Have you used sites that use the HTML Notification API before? Are you familiar with what it is? Because it kind of feels like you're not. The notification popups NodeBB does is obviously an attempt to imitate the Notification API, but (among other things!) it's missing the most important feature: notifications showing up outside the current webpage.
I thought it was obvious from what I said that I have. Yes, they show up outside the webpage. For a moment. If you have the page open. And then they are gone. I mean, yeah, the little popups they do are similar in that sense. But so what?
Like I said, the native notifications are ephemeral, which makes them relatively useless comparatively.
-
@boomzilla all he's talking about is using the browser's desktop pop-up instead of the in-page toaster popup. Everything else would remain the same.
-
@anotherusername Oh, well fuck that, too. I don't need extra stuff from nodebb popping up like that.
-
@boomzilla said in All notification clicks are not created equal:
@anotherusername Oh, well fuck that, too. I don't need extra stuff from nodebb popping up like that.
You can always disable desktop notifications (it'd have to ask for permission).
Then it could go back to the in-page toaster like it does now.
-
@anotherusername ...which he would know if he was familiar with sites that used it.
-
@anotherusername Well, they still probably need to have that sort of popup for other messages, like erros or whatever.
@masonwheeler said in All notification clicks are not created equal:
@anotherusername ...which he would know if he was familiar with sites that used it.
Uh...no? Because they only seem to do that out of site popup. Oh, you meant the disallow thing? Sure, but that wasn't my point and I still think it's a bad idea and like I said they'd still need them for other sorts of things.
-
@boomzilla if the site's allowed to display notifications, this will generate a popup.
new Notification("test", {body: "test"});
Go ahead and try it. Nothing will happen, because it's not allowed to.
-
@boomzilla said in All notification clicks are not created equal:
Sure, but that wasn't my point
But my point, the point of the original topic (actually a side point that we've somehow gotten all distracted and derailed onto) is that this is (for most people at least) a desirable thing that the forum should be doing instead of its current broken halfway-implementation. (And if you don't like it, you can disallow it and it could fall back to the broken version.)
-
@anotherusername then, run this:
Notification.requestPermission();
It'll request permission to display them. If you click "always allow" and re-enter the same line as previously, now it'll display the notification. If you click "block", it won't. And after allowing them, you can click the information bubble in the address bar to revoke the permission anytime you want.
-
@masonwheeler I would rather discourage this notification thing so that browsers will get rid of it.
-
@masonwheeler said in All notification clicks are not created equal:
And if you don't like it, you can disallow it and it could fall back to the broken version
Also, I don't understand how using the notifications api would fix anything.
-
@boomzilla said in All notification clicks are not created equal:
@masonwheeler I would rather discourage this notification thing so that browsers will get rid of it.
@boomzilla said in All notification clicks are not created equal:
Also, I don't understand how using the notifications api would fix anything.
It would fix not being able to see notifications when I'm not currently in this tab. But as I said, this is just a side issue; the real complaint is in the OP.
-
@masonwheeler said in All notification clicks are not created equal:
And if you don't like it, you can disallow it and it could fall back to the broken version.
Or just fall back to nothing. I mean, the little bell tells you notifications. You don't need them in multiple places :/
-
@masonwheeler said in All notification clicks are not created equal:
It would fix not being able to see notifications when I'm not currently in this tab. But as I said, this is just a side issue; the real complaint is in the OP.
Do you really want to see notifications when you're not in the tab? I have this enabled for calls that come in from hangouts but I cannot imagine wanting something like that for nodebb. I would go mad if those kept popping up. I mean...I guess...maybe you really are that obsessive about it.
I like to keep my web pages inside my browser.
-
@RaceProUK Most importantly, not supported in Chrome for Android.
-
@boomzilla said in All notification clicks are not created equal:
Do you really want to see notifications when you're not in the tab?
@boomzilla said in All notification clicks are not created equal:
I cannot imagine wanting something like that for nodebb. I would go mad if those kept popping up.
That's the beauty of it: you could disallow them! You would only have to do it once. I don't see what the problem is.
-
@masonwheeler said in All notification clicks are not created equal:
I don't see what the problem is.
No, a crazy person who needed nodebb notifications outside their webpage wouldn't.
-
@masonwheeler said in All notification clicks are not created equal:
- If I click on the faux-notification div box (side note: why does NodeBB have a poorly-implemented, half-functional copy of the Notification API instead of simply using the Notification API?) I get taken to the new post, but it isn't marked as read.
- If I click on it from the menu in the status bar, the notification gets marked as read.
- If I CTRL-click on it, it opens the post in a new tab, and the notification gets marked as read.
- If I click the mouse wheel on it, which is expected to do the same thing as a CTRL-click, it opens the post in a new tab, but the notification does not get marked as read.
I have also noticed:
- If the notification is for a new post in a followed thread or a mention, then having the containing thread open in any tab clears the notification.
- If the thread that contains the post that the (like) notification is for is already open (in the current tab or another), then "any"-clicking the notification will clear it.
- If the thread that contains the post that the (like) notification is for is not open (in the current tab or another), then "any"-clicking the notification will not clear it.
-
@boomzilla Some of us actually find that feature useful.
-
@boomzilla said in All notification clicks are not created equal:
No, a crazy person who needed nodebb notifications outside their webpage wouldn't.
How else am I supposed to read posts before they get fbmac'd???
-
I was going to try to make a shim to replace the toasters with proper
Notification
-based popups, but I can't fucking figure out how to "translate" the template that it's creating for the alert... is there a globally-accessible function that does it?
-
@boomzilla said in All notification clicks are not created equal:
@masonwheeler I would rather discourage this notification thing so that browsers will get rid of it.
Yes - I click "Block" for every website that asks, irregardless.
-
TBH I'd rather any development effort was spent making the existing notifications less broken, rather than making them broken in more places.
-
@anotherusername so basically, I'm getting a notification object like this...
{ alert_id: "new_notif", clickfn: i.prepareDOM/</n.clickfn(), title: "[[notifications:new_notification]]", timeout: 2000, message: "[[notifications:upvoted_your_post_in, Luhmann, The Official Likes Topic]]", type: "info" }
I can call,
templates.parse('alert', temp3, function (t) { console.log(t); });
...and that dumps this:
<div id="new_notif" class="alert alert-dismissable alert-info clearfix" component="toaster/toast"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <strong>[[notifications:new_notification]]</strong> <p>[[notifications:upvoted_your_post_in, Luhmann, The Official Likes Topic]]</p> </div>
I've dug through the source, though, and I still have no freaking clue how it does the translation so that the notification actually reads, "Luhmann has upvoted your post in The Official Likes Topic.".
(wtf... it was even replacing inside my post!)
-
@loopback0 said in All notification clicks are not created equal:
Yes - I click "Block" for every website that asks,
irregardless.
-
@anotherusername said in All notification clicks are not created equal:
Luhmann has upvoted your post
Liar! I did not such thing!
-
@anotherusername said in All notification clicks are not created equal:
your post in The Official Likes Topic.
Oh yeah ... that could be. Carry on.
-
@Luhmann did... did you get a notification from my post? Or did you just happen to come across it?
-
@Luhmann psst! That post up above that you replied to... did it generate a notification to you?
-
I know the answer to your question
-
[[notifications:upvoted_your_post_in, mods, All notification clicks are not created equal]]
does it notify?
edit: No, I guess not. I would've been pretty surprised if it did.
-
@anotherusername
Yes that one did, the first one didn't
-
[[notifications:upvoted_your_post_in, @mods, All notification clicks are not created equal]]
?
-
@loopback0 Hah.
-
@loopback0 I think it's expanding the mention before the translation occurs.
-
How about
@[[notifications:upvoted_your_post_in, mods, All notification clicks are not created equal]]
-
@anotherusername ...nope, of course not: even if the mention would've replaced, it can't because there's a
<strong>
tag in the way.
-
[[notifications:upvoted_your_post_in, @index, All notification clicks are not created equal]]
-
[[notifications:upvoted_your_post_in, @index @mods @administrators @area_can, All notification clicks are not created equal]]
?
-
@loopback0 Can you please take that to a different thread?