Page MenuHomePhabricator

Feature request: Have MediaWikiChat display a "-" rather than a "+" in the tab/window title when users leave the chat
Open, LowPublic

Description

This isn't a bug as far as I know, but the "+" added to the tab/window title of the chat when someone joins or leaves doesn't really differentiate between the two. I suggest that a "-" should be used for leaving users rather than a "+", as this would make it easier to determine whether or not someone has joined or left without having to turn on desktop notifications.

Event Timeline

lcf119 renamed this task from MediaWikiChat displays a "+" in the tab/window title when users leave the chat to Feature request: Have MediaWikiChat displays a "-" rather than a "+" in the tab/window title when users leave the chat.Sep 3 2016, 4:22 AM
lcf119 renamed this task from Feature request: Have MediaWikiChat displays a "-" rather than a "+" in the tab/window title when users leave the chat to Feature request: Have MediaWikiChat display a "-" rather than a "+" in the tab/window title when users leave the chat.
lcf119 created this task.

Change 309773 had a related patch set uploaded (by Jack Phoenix):
Display a "-" rather than a " " in the tab/window title when users leave the chat

https://gerrit.wikimedia.org/r/309773

Change 309773 merged by jenkins-bot:
Display a "-" rather than a " " in the tab/window title when users leave the chat

https://gerrit.wikimedia.org/r/309773

SamanthaNguyen claimed this task.

Commit merged to MediaWikiChat repo by jenkins-bot

lcf119 raised the priority of this task from Lowest to Low.

It seems like all that has happened is that - has replaced +, as when a user joins/leaves, - is displayed regardless.

It seems like all that has happened is that - has replaced +, as when a user joins/leaves, - is displayed regardless.

Indeed. Something I failed to understand back in 2016 was that the appropriately named MediaWikiChat.flashJoinLeave method is called for both cases: when someone joins AND also when someone leaves the chat. Its internals do not change depending on the action type, it always performs the same logic.

This could be fixed by splitting MediaWikiChat.flashJoinLeave into two new methods: MediaWikiChat.flashJoin and MediaWikiChat.flashLeave ; these would then be called when the user joins the chat or leaves (/is kicked out from) it.

The mildly annoying part here is the user preference options chat-ping-joinleave and chat-notify-joinleave, which control whether a sound is played or a desktop notification is fired off, respectively, on user joins and leaves. To work around that, we will need to:

  1. split the chat-*-joinleave options into chat-*join and chat-*-leave
  2. provide a backwards compatibility mapping for those, e.g. if the user had the chat-ping-joinleave option enabled, they would now need to have chat-ping-join and chat-ping-leave enabled; I think this could be done with an extension registration callback in extension.json
  3. implement the aforementioned splitting of MediaWikiChat.flashJoinLeave into two new methods