[Plugin] Notifications system (1.0)

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
The way it's meant to be

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #91, on April 5th, 2013, 07:31 PM »
The post above mine about using TinyCon - I did most of a plugin to put the number of unread PMs into the favicon but for some reason I never finished it.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Plugin] Re: Notifications system (1.0)
« Reply #92, on April 5th, 2013, 07:31 PM »
Quote from Arantor on April 5th, 2013, 07:31 PM
The post above mine about using TinyCon - I did most of a plugin to put the number of unread PMs into the favicon but for some reason I never finished it.
Why not? That sounds interesting.

MultiformeIngegno

  • Posts: 1,337

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #94, on April 5th, 2013, 07:36 PM »
Lemme dig it out, I'm sure I can convert it to use the regular notifications system without too much trouble.

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Plugin] Re: Notifications system (1.0)
« Reply #95, on April 9th, 2013, 09:01 AM »Last edited on April 9th, 2013, 09:10 AM
Quote from Arantor on April 5th, 2013, 07:36 PM
Lemme dig it out, I'm sure I can convert it to use the regular notifications system without too much trouble.
Which reminds me, PM also have notifications. Hm, leave it alone or make the entire thing use notifications core? Also, do you have any ideas on how to handle the Email templates? You have some idea how I'm intending emails to be handled, but I'm not really sure how to go about it (Currently they suck, I had no idea where I was mentioned and the email was without any clickable link :P).

@Nao: Any summary of changes left for the notifications/not in SVN yet? Oh and can you make my unread_notifications count 0? it's driving me crazy :P

Also, did anyone test periodical notifications? Do they work? :P

Nao

  • Dadman with a boy
  • Posts: 16,079
[Plugin] Re: Notifications system (1.0)
« Reply #96, on April 9th, 2013, 12:03 PM »
- Dynamic favicons: I don't like the demo I saw for Tinycon... I don't know. One of the things is that when you have plenty of tabs opened, once a notification is there, all of your favicons are going to be updated...

Ah... If only we could send a message across all tabs, stopping timers, things like that...!
Hmm... Thinking about it... That might be a good opportunity to start using local storage...?!
For instance, on each server request, I could store the latest request time & response. And maybe a random ID that stays the same for the duration of the page. Then every tab checks the same local storage... Before doing a server request, they can check for the content stored in that. If the last time isn't expired, then take that data and cancel the server request. This would allow tabs to do their requests more frequently, e.g. less than a minute, rather than 10 minutes for now (for inactive tabs).
If one tab is active, show the notification in its title, hide it from others. If no tab is active, show notification in all tabs, so as to REALLY draw your attention, maybe..?
There's so much that could be done with notifications, really...
Very strange that I'm spending so much time on a feature I didn't write, didn't think of, and didn't even really want in the first place... :^^;:

- Never tested periodical notifications. Never received any e-mails.

- If it's not zero, then you have unread notifications... Don't you..? Wedge.org should have the ability to mark them as read, AFAIK..?

- PM notifications should become normal notifications, I agree, *but* they should have high priority, and that's one of the things that bother me... If you receive tons of notifications for 'likes', you'll tend to ignore ALL notifications. Eventually, we'll need to add more user settings, such as 'ignore notifications by type', 'ignore notifications by user', etc...

- I'm also thinking of giving the user a strong visual hint when a new notification shows up when they're using the page. For instance, automatically open the popup...? And show it as position:fixed to ensure it shows up whatever the position in the page. Or just have a small, unrelated popup in the top left corner, saying "You've got a new message!", and then closing itself after a few seconds or on click...?

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Plugin] Re: Notifications system (1.0)
« Reply #97, on April 9th, 2013, 12:51 PM »
Will reply to the rest of the things later, but you can disable individual types of notifications, see your profile area. And user configurable priority is something I thought of but didn't really do it, it's not a bad idea. And I have no actual unread notifications, just a counter saying 1, it got messed up sometime when the site was being modified or something.

Nao

  • Dadman with a boy
  • Posts: 16,079
[Plugin] Re: Notifications system (1.0)
« Reply #98, on April 9th, 2013, 04:12 PM »
It's interesting that I didn't remember that area, even though I translated it all to French... ;)
Maybe it should be made more prominent. Right now, it sits where IIRC there was already a 'Notifications' area, but it's different now... Anyway.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #99, on April 9th, 2013, 04:14 PM »
Yes, that was intentional - but we can't really remove it until we also fix up notifications for topics and replies and stuff (and have a way for users to unsubscribe from boards/topics/whatever on a selective basis)

Nao

  • Dadman with a boy
  • Posts: 16,079
[Plugin] Re: Notifications system (1.0)
« Reply #100, on April 9th, 2013, 04:28 PM »
You don't have to use permissions for that...
I'd say there are things that should be left to the user's discretion, rather than the admin's.

For instance, what if I don't want users to access my profile? Or I'm okay with that, but not with reading my latest posts? Or my galleries? Or my posting statistics..?
Members have a data field, it's not for nothing. :)

Things that can be stored in data fields:
- member data: whatever notifications I want to ignore; whatever profile areas I want to hide from whatever membergroup(s) or member ID(s). Plenty of other things, I'm sure...
- topic data: set a 'fallback' topic for a particular topic; if it's locked, Quote and Reply buttons will still show up, but will be redirect to said fallback topic. Set membergroups or member ID(s) that can keep quoting, or posting. e.g. in here, 'New Revs' would be a perfect candidate for that. Set all users to be redirected to 'New Revs Public Comments', set Arantor and Nao to keep the Reply (or Quick Reply) button (but not their Quote buttons). This allows users to actually quote a post without having to manually copy and paste it...! (I think there was a discussion regarding this at Elk, recently. I was surprised we had a similar idea, but apparently our implementations would be different.)

Of course, all that matters here, is making a suitable UI for these... And I'm not exactly the greatest at UIs, I'm afraid, so it's not even in my to-do list I think...!

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #101, on April 9th, 2013, 05:09 PM »
Quote
You don't have to use permissions for that...
I'd say there are things that should be left to the user's discretion, rather than the admin's.
Wait, what? How did we get to this?

Oh, I agree, but there are things admins will want to change the defaults for. For example, there is currently no way to reset the default PM mode from the admin panel. Nor is there a way to override notifications to set things for people by default (the number of people who want to opt everyone in to notifications on everything is slightly frightening but there are some legitimate cases for it)
Quote
For instance, what if I don't want users to access my profile? Or I'm okay with that, but not with reading my latest posts? Or my galleries? Or my posting statistics..?
Well, they can see your latest posts if they can see the boards you posted in... same for galleries. Why you'd want to hide profile in general or stats... not so sure. But I can see the logic of it.
Quote
Things that can be stored in data fields:
- what sanctions are currently in force on the account and when they expire ;)
Quote
- topic data: set a 'fallback' topic for a particular topic; if it's locked, Quote and Reply buttons will still show up, but will be redirect to said fallback topic.
Wait... neither the messages nor the topics tables have data fields... Though a data field on topics would be quite nice, could do all sorts of fun things like auto redirection topics then.

Though the concept of a fallback topic is an interesting one. I'm not sure what the UI would look like but it's interesting nonetheless. What Elk proposes is 'quote to new topic' which is a different variation on the theme.
Quote
Of course, all that matters here, is making a suitable UI for these... And I'm not exactly the greatest at UIs, I'm afraid, so it's not even in my to-do list I think...!
I'm not the greatest at UI either but I figure if I keep cracking on with them I'll get better :P
Posted: April 9th, 2013, 04:41 PM

Actually, I'd quite like a data field on messages too, I can have some fun warning stuff in there, but I can safely live without that for now ;)

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Notifications system (1.0)
« Reply #103, on April 10th, 2013, 01:31 PM »
Other than being Webkit only, and don't actually appear to work for me (the example about grabbing tweets from Twitter didn't show me a single notification even when I specifically gave it one to test)

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Plugin] Re: Notifications system (1.0)
« Reply #104, on April 10th, 2013, 02:27 PM »
Quote from Arantor on April 10th, 2013, 01:31 PM
Other than being Webkit only, and don't actually appear to work for me (the example about grabbing tweets from Twitter didn't show me a single notification even when I specifically gave it one to test)
I think it's chrome only, you sure you gave it permission? There was another demo which asked for a title and message which worked fine for me, plus I've been using these for Gmail since forever.