Page MenuHomePhabricator

The document title should be dynamically updated to include a (n) notifications count in the browser title bar.
Open, LowPublic

Description

I propose to make it possible for MediaWiki to put a (1) in the browser tab to indicate there is a new recent change (or other notification) on the wiki. This would be similar to what Facebook, Quora, Gmail, etc. do.

An alternative idea is T1188: Include echo notification count as a favicon badge

The discussion in comments below, suggests that that this should be an opt-in gadget/userscript, and not a default feature.

Details

Reference
bz73209

Related Objects

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:45 AM
bzimport set Reference to bz73209.
bzimport added a subscriber: Unknown Object (MLST).

[The bug title does not describe a bug but a solution or feature / new functionality. Hence setting priority to enhancement.]

It could be useful on [[Special:Notifications]] page, but I'm not sure if relevant on other pages.

Gmail for example prints the number of unread mail if you're in a message list (inbox, label, search, etc.) but not on other pages.

Do you think some people will stay on [[Special:Notifications]] to get discrete title bar update? If so, yes, that could be interesting.

By the way, on my Firefox installation, this is truncated at Notificatio… when there a a lot tabs, as "Notifications — Wikip…" (and so with space to print a notifications count) when the tabs bar isn't full.

I think the number badge should be present so long as there is an echo badge, irrespective of what page you're on. I think it could actually be kind of confusing if it came and went as you changed pages.

Also to be clear the (1) should be (X) where X is the number corresponding to the total number of echo notifications.

(In reply to Jared Zimmerman (WMF) from comment #3)

I think the number badge should be present so long as there is an echo
badge, irrespective of what page you're on. I think it could actually be
kind of confusing if it came and went as you changed pages.

When you're on Gmail and change folder, the count changes to reflect the folder you're.

On a Flow page, the expected count for example would be following this logic the number of unread Flow messages, not the total number of notifications.

(In reply to Dereckson from comment #2)

Do you think some people will stay on [[Special:Notifications]] to get
discrete title bar update? If so, yes, that could be interesting.

Does Echo ever check for updates (in any part of the UI) if you're just sitting there? I know it does if you explicitly click the badge.

In T75209#749465, @Mattflaschen wrote:

(In reply to Dereckson from comment #2)

Do you think some people will stay on [[Special:Notifications]] to get
discrete title bar update? If so, yes, that could be interesting.

Does Echo ever check for updates (in any part of the UI) if you're just sitting there? I know it does if you explicitly click the badge.

Issue handled separately in T34284, already defined as a blocker.

(To partially repeat myself from T1188)

Could this be implemented as a userscript/gadget, instead? Then people can opt-in, if they want it.

I find the numbers in the titles of Trello, Gmail, and Phabricator to be quite annoying. They blink/change, and distract my attention, 99% of the time for something that isn't urgent.
If I have a lot of tabs open - which I and many highly active editors usually do - then all those tabs will be blinking/updating.

Altering the title string, also has the side-effect of including the number when I bookmark a page, or use a bookmarklet to [blog/tweet/etc] something. E.g.

(15) Biscayne National Park - Wikipedia, the free encyclopedia

(To partially repeat myself from T1188)

Could this be implemented as a userscript/gadget, instead? Then people can opt-in, if they want it.

Yes, definitely.

To also repeat myself from T1188, I don't think that this would be very useful, but it would definitely be a lot less annoying than the favicon changing proposed there. So, I could live with this if it's widely considered worthwhile. :)

Quiddity set Security to None.

To clarify for those who wish to do this as a microtask for GSoC or Outreachy - you can do this as a gadget (or a user script) - to get more information about how to start with a user script, see the manual in Wikipedia

You can create this script in MediaWiki.org in your user's common.js page (you must be logged in)

When you are done with the script, you can link to it from your Outreachy or GSoC proposal.

@Eee888 's code is available here: https://en.wikipedia.org/wiki/User:Eee888/common.js

There are a couple of minor comments (see T161823: Outreachy Proposal - remind me this article in X days) but other than those, this can be used as a gadget or shared code to resolve the need.

@Framawiki If you want to be in touch with Flow developers, you can ask on #wikimedia-collaboration channel feedback on your JS solution.

The next step should be either using it as a script in your userspace's common.js or discussing it with the community/admins and adding this as an official gadget to the wiki.

Edit - The next step is to put the master code in mw.org (working on this) as a gadget, and then local wikis can use it as a per-wiki basis. I'll update when the gadget is available on mw.org.

Gadget is officially available on mw.org: https://www.mediawiki.org/wiki/MediaWiki:Gadget-NotifCountTitle.js

To use in another wiki, you can ask an admin to add a local gadget linking to the code above.

Aklapper added a subscriber: Eee888.

@Eee888: I am resetting the assignee of this task because there has not been progress lately (please correct me if I am wrong!). Resetting the assignee avoids the impression that somebody is already working on this task. It also allows others to potentially work towards fixing this task. Please claim this task again when you plan to work on it (via Add Action...Assign / Claim in the dropdown menu) - it would be welcome! Thanks for your understanding!

RHo subscribed.

No design required since this is about adding an notifications count in browser title bars/tabs.

kostajh added subscribers: Shivanshbindal9, Catrope, kostajh.

I propose to make it possible for MediaWiki to put a (1) in the browser tab to indicate there is a new recent change (or other notification) on the wiki. This would be similar to what Facebook, Quora, Gmail, etc. do.

This was done recently by @Shivanshbindal9 in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Echo/+/518869, for T225259. At the moment it's feature flagged behind wgEchoPollForUpdates. A follow-up here could be, in addition to the feature flag which specifies the polling rate, to define user preferences for whether polling should happen, and if so, if document title should be modified (as happens in the patch above). Assigning to @Shivanshbindal9 to follow-up on and discuss with me and @Catrope.

@Catrope and I discussed this, and we'd like to have a preference for "Show unread messages count in window title" (exact wording to be finalized later). We can then use this preference to output the unread count on the server-side, and that preference can also be used by the client side code.

The preference was added in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Echo/+/527635

I'll leave this open, since the feature flag is currently not enabled in production anywhere.

The preference was added in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Echo/+/527635

I'll leave this open, since the feature flag is currently not enabled in production anywhere.

Resetting assignee, as I don't think that @Shivanshbindal9 plans to work on that. :)