question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Notify user of new messages via document.title

See original GitHub issue

IRCCloud does this well - they prepend a (+) to the document.title when there are unread messages in the open buffer when the tab isn’t focused.

https://github.com/erming/shout/pull/348/ tried to accomplish this in Shout.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:24 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
AlMcKinlaycommented, Jul 18, 2018

More discussion on the IRC. The quick answer to @xPaw is “all of them”, but there’s a longer answer down below. We discussed a lot about it.

Those of us in the discussion (me, fnutt, and xpaw) agreed that we would all be happy with a solution that had 3 favicons and didn’t change anything with how the title currently works. The 3 favicons would be:

Current standard favicon: when there are unread messages but no highlights/queries Current highlight favicon: when there are highlights/queries A new favicon (possible monochrome version of the standard one): when there are no unread messages or highlights/queries

This would mean that there was no effective change in functionality to people who have a lot of channels, but for those who like to keep their irc constantly clean of unread messages, there is a visual difference in the favicon between those states.

Please correct me if I misunderstood what we agreed, and let me know other people if you think that’s not a good idea. @astorije , would we be able to contact the designer to see what they think about this, and whether or not a monochrome favicon would work for this.

I really like this solution as it fixes the feature for what I want, but also it doesn’t mean that anyone else has something staring them in the face if they always have unread messages. This feels like the best of both worlds.

Messages in the discussion below:

15:13:59 <+McInkay>  I agree that something like having a "1" in the favicon when there are unread messages is bad
15:14:06 <+McInkay>  And I don't want to do what discord does...that annoys me
15:14:22 <+McInkay>  It has a massive red blob on it which is very similar to the unread notification when there's an unread message
15:14:30 <+astorije>  I do think title number should display highlight/query counter only but iy haven't followed the whole discussion so I might be misguided
15:14:41 <+McInkay>  I agree the number in the title should only be highlight/query
15:14:48 <+McInkay>  This is not going to change that
15:14:52 <+astorije>  👌
15:14:53 <+McInkay>  This is in addition to that
15:14:59 <fnutt>  I think the question we need to ask ourself is - what does the majority of people expect from the feature? and what would they be interesting to get notified about?
15:15:28 <+xPaw>  unreads in all channels seems pretty useless to me, as far as I'm concerned
15:15:35 <+McInkay>  But there are 2 things that I like that other things do. 1. Slack has an unread favicon. When there are unread messages it looks very slightly different: https://files.yamanickill.com/haLhockL.png but not enough to be ridiculously obvious and annoying

15:15:35 <+xPaw>  it'd be always unread for me, so like no use whatsoever
15:15:46 <+McInkay>  First slack tab here is all read, second has an unread message
15:15:54 <fnutt>  I'm on the same page as you, xPaw.
15:16:19 <fnutt>  It would be rather useless to me if unread messages where I'm not mentioned is taken into account.
15:16:26 <+McInkay>  The other option is the just adding a "*" to the end of the title when there are unread messages, and that creates the blue dot on Chrome or the white haze on firefox. Example: https://files.yamanickill.com/KBLk1evw.png

15:16:56 <+McInkay>  Either of these would not change the number in the title, nor would they remove the highlight favicon. They are in addition. And they wouldn't change much for people who don't find the feature useful.
15:17:09 <fnutt>  Do you think the majority of non-techy people will understand this, McInkay?
15:17:32 <+xPaw>  the problem with relying on browsers' thingamagic of detecting title changes - theres no difference between hl or unread
15:17:49 <+McInkay>  The blue dot, definitely. It is used in so many web apps and works really well.
15:18:06 <+McInkay>  xPaw: sure, but it doesn't matter, right? If there are highlights, that will always overright unread anyway
15:18:17 <+McInkay>  It makes 0 difference in that case. 
15:18:31 <+McInkay>  Because currently, if you get a highlight, you'll get the highlight favicon and you'll get the blue dot
15:18:56 <fnutt>  But you want the blue dot to show if there is unread messages?
15:18:57 <+xPaw>  so you're saying favicon shouldnt change for unreads, just the title?
15:19:01 <+McInkay>  But if you have a highlight, then of course you have an unread message
15:19:26 <+McInkay>  Like...who's going to look at the highlight favicon and go "Oh, look, I've got a new highlighted message...I wonder if there are any unread messages" 
15:19:30 <+McInkay>  No, I'm not saying that. 
15:19:51 <+McInkay>  There are 2 options for us to do this feature. I like both of them, but I'd be happy with only doing 1 or the other, and I don't mind which we would do, but I would like to do 1 of them.
15:19:59 <+xPaw>  i was saying the opposite, the blue dot can be mistaken for highlights, when it fact it was just the unread
15:20:06 <fnutt>  Number in title = Highlights
15:20:07 <fnutt>  Favicon change = Highlights
15:20:07 <fnutt>  Dot on favicon = Unread messages
15:20:14 <fnutt>  Did I understand your suggestion correct?
15:20:18 <+McInkay>  No, because the highlight favicon won't be showing, xPaw 
15:20:23 <+McInkay>  fnutt: that's 1 of the options, yes
15:20:50 <+McInkay>  The other option is having 3 favicons. The normal one, one that is very slightly different (see slack's white and grey ones), and the highlight one.
15:20:53 <fnutt>  I'm not sure if people will understand the difference, tbh. :/
15:21:04 <fnutt>  (non-techy people)
15:21:10 <+McInkay>  It's not like I'm suggesting some new fangled idea that no one has ever done
15:21:22 <+McInkay>  Basically every single pinned app that I have does this
15:21:48 <fnutt>  I like the idea of three different favicons better than changing how the blue dot works.
15:22:15 <+McInkay>  The problem with the favicon is that the highlight favicon is much less obvious now
15:22:28 <+McInkay>  So how would we have a favicon that was obviously different? 
15:22:38 <+McInkay>  Subtle enoug hthat it means "unread messages" but not "highlights"
15:23:20 <+McInkay>  It's one of the few things I really like in slack, the 3 favicons are great. The "everything is read" is black and grey, the "there are unread messages" is black and white, and the highlight favicon is red, it's so very different. 
15:23:45 <fnutt>  Agree about the principle.
15:23:50 <+McInkay>  I get that it wouldn't be a useful feature for some people, because not everyone is constantly reading messages like me.
15:23:57 <fnutt>  Too many colours on our current favicon. :/
15:24:07 <+McInkay>  I disagree with that point :-P 
15:24:18 <+McInkay>  Currently, I have 1 channel with an unread message and as soon as I send this message I'll be reading it, then there will be no unread messages. 
15:24:30 <+xPaw>  how many channels are you in though
15:24:30 <fnutt>  Well, having many colours makes it harder to do exactly what you suggest, I think.
15:24:42 <+xPaw>  this feature falls apart quickly as soon as your channel count increases
15:24:47 <+McInkay>  25 channels
15:24:51 <+McInkay>  Across 4 servers
15:25:16 <+McInkay>  But the point is that the feature doesn't work if you are in high bandwidth channels, yes, but it doesn't break in a bad way.
15:25:31 <+McInkay>  It just means you'll never see the read favicon, but they are so close together that it doesn't make any real difference to you.
15:25:37 <fnutt>  Different needs.
15:25:41 <+McInkay>  But it adds a tiny piece of useful information to those of us who do read everything.
15:25:44 <fnutt>  Not everyone are in 25 channels. haha
15:25:56 <+McInkay>  Like, I never have to go into my slacks if they are on the other favicon. I know there's nothing new there.
15:26:04 <+xPaw>  McInkay, would the unread favicon also add + to the title thjo
15:26:08 <+McInkay>  But with the lounge I have to check occaisionally to see if there are new messages.
15:26:16 <+McInkay>  xPaw: it could, or it might not, it depends what we decide
15:26:36 <+McInkay>  There are 4 options: we do nothing, we just add "*" to the title, we just change favicon, we do both
15:27:12 <+McInkay>  I don't massively care which we do (except obviously I would prefer if we didn't do nothing) but like how slack does it (which is both)
15:27:22 <+McInkay>  I know we are not slack, and I'm not trying to turn us entirely into slack
15:27:32 <+McInkay>  But we steal ideas from places that work, and I think it works.
15:27:43 <+McInkay>  I wouldn't want to do what discord does, as that's far too in your face
15:27:43 <+xPaw>  agree to disagree
15:28:00 <fnutt>  I'm on the idea with three favicons, and reserve the blue dot and title to highlights.
15:28:12 <fnutt>  to=for*
15:28:20 <+xPaw>  the unread favicon should be fine, depending on how much the color chanages
15:28:30 <+xPaw>  and as long as highlight one still stands out properly
15:28:39 <+McInkay>  I'd be fine with that, fnutt , but we would need to get the favicon right
15:28:55 <+McInkay>  I'm not sure what that would mean...it's a difficult one. 
15:29:06 <+McInkay>  Because currently I'm not happy with our favicons anyway, I still hate the white one. 
15:29:14 <fnutt>  Black/white + the two others we have atm?
15:29:23 <+McInkay>  But I've not had a chance to play around with the transparent one yet
15:29:44 <+McInkay>  So a monochrome favicon when there are no unread messages, fnutt , is that what you are suggesting? 
15:29:55 <fnutt>  Transparent favicon would be nice to look into. Maybe it can work really well.
15:30:07 <+McInkay>  This is where we channel astorije and say we can ask the designer what they think
15:30:21 <fnutt>  But we probably need to make the dots and circles wider?
15:30:35 <fnutt>  McInkay: Yes.
15:31:02 <+McInkay>  A monochrome favicon for everything being read, the transparent background one (it's the same as the white one but with transparent instead of white background) for when there are unread messages, and the current highlight one for when there are highlights.
15:31:08 <fnutt>  Monochrome I think usualy is understood as nothing new - it's dead.
15:31:09 <+McInkay>  If that's what we went with, I would be totally happy with that.
15:31:22 <+xPaw>  it'd be weird to have 1 of 3 icons be transparent
15:31:23 <+McInkay>  And I think that would make you guys happy because you'd see no real difference ever.
15:31:34 <+McInkay>  xPaw: well, the transparent one or the white one
15:31:36 <+McInkay>  That's a separate issue
15:31:39 <+McInkay>  Let me rephrase
15:31:46 <Koopz>  did y'all check what the favion looks like when the browser can't load the page?
15:31:51 <+McInkay>  A monochrome favicon for everything being read, the current normal one for when there are unread messages, and the current highlight one for when there are highlights.
15:31:52 <fnutt>  Make a PR with the suggestion?
15:32:23 <+McInkay>  If I have the time :-P I go on holiday in 2 days. 
15:32:34 <Koopz>  chrome removes the color from favicons if it couldn't load a page
15:32:37 <+McInkay>  But yeah, it would probably be good to check this with the designer to see what they think, but I would be happy with that.
0reactions
xPawcommented, Jul 18, 2018

When you say unread messages, do you mean active channel or all of them?

I think doing it for all channels would be madness, but doing it for active (out of focus?) channel could be neat and is what the original issue was about.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Notify user of new messages via document.title #1311 - GitHub
Notify user of new messages via document.title #1311 ... Type: Feature Tickets that describe a desired feature or PRs that add them to...
Read more >
How to build a Flash Title Notification with JavaScript
Flash titles are very useful to alert the user of their new notifications when they are away on another website, and in this...
Read more >
How to alert in title bar of browser on receiving a new message?
Modify document.title (by assigning new values to it) repeatedly using ... To detect if the user has switched to other tab, use this...
Read more >
Get notified when members of your team update your shared file
To open it, just click the document title on the title bar at the top of the window, and select Version History. The...
Read more >
Notifications - System experiences - Human Interface Guidelines
If you can only provide a generic title for a noncommunication notification — like New Document — it can be better to let...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found