Page MenuHomePhabricator

mw.notification: Postpone autoHide timer if window was not focused
Closed, ResolvedPublic

Description

I think it would be better if the notification messages posted with mw.notiy, with auto-hide enabled, should not hide while the user is reading another browser tab/window. The timer should be disabled until the user come back to the screen where the notification is visible, or it may be hidden before the user notices its existence.

See also:

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:58 AM
bzimport set Reference to bz40322.
bzimport added a subscriber: Unknown Object (MLST).

Nice catch, yes we should implement that!

The window focus/blur events can be used to detect switches to other tabs and windows.

$(window).on({

blur: function () {},
focus: function () {}

});

Change 154227 had a related patch set uploaded by Helder.wiki:
Postpone autoHide timer of notifications if window is not focused

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

matmarex removed a project: Patch-For-Review.
matmarex set Security to None.
matmarex added a project: good first task.
matmarex removed a subscriber: Unknown Object (MLST).
matmarex subscribed.

Somebody should totally revive and complete that patch. :)

Hello I'm all new to MediaWiki development and FOSS projects.I would like to try work on this bug as my first fix.

@Pratikbsp : Hey ! You should probably be cloning MediaWiki-core as per http://www.mediawiki.org/wiki/Gerrit/Tutorial and should be trying to understand what went wrong with https://gerrit.wikimedia.org/r/#/c/154227/

Thanx, I have cloned Mediawiki-core and have started working in it.

This comment was removed by Pratikbsp.
This comment was removed by Pratikbsp.

Change 190360 had a related patch set uploaded (by Ori.livneh):
mw.notification: Postpone autoHide timer if window was not focused blur and focus function were added to determine window focus

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

Patch-For-Review

Jdlrobson changed the task status from Open to Stalled.Nov 3 2015, 12:43 AM
Jdlrobson subscribed.

Waiting on a reply from @Pratikbsp - can you change the status when you have had the time to respond with a new patchset? If so, I'll happily help out with review!

Krinkle changed the task status from Stalled to Open.Jul 25 2017, 8:40 PM
Krinkle removed Pratikbsp as the assignee of this task.
Krinkle updated the task description. (Show Details)
Krinkle removed a project: Patch-For-Review.
Krinkle added a subscriber: StudiesWorld.

Removing assignee and stalled status so that other new contributors may pick this up. @Pratikbsp feel free to re-assign at any point if you still work on https://gerrit.wikimedia.org/r/190360.

Change 190360 abandoned by Krinkle:
mw.notification: try not to autohide if the user didn't see

Reason:
Closing backlog. Feel free to re-open at anytime.

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

Change 379568 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/core@master] Timeout autoHide notifications based on visible time

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

Change 379568 merged by jenkins-bot:
[mediawiki/core@master] Timeout autoHide notifications based on visible time

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

matmarex assigned this task to EBernhardson.
matmarex removed a project: Patch-For-Review.