Last modified: 2014-02-20 11:02:29 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T59400, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57400 - Notification objects are hard to access
Notification objects are hard to access
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.23.0
All All
: Normal enhancement (vote)
: 1.23.0 release
Assigned To: Bartosz Dziewoński
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-22 06:59 UTC by Lee Worden
Modified: 2014-02-20 11:02 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Lee Worden 2013-11-22 06:59:03 UTC
It would be nice to let mw.notify() return the notification object it creates, so that our code can easily update its contents, pause it, etc.
Comment 1 Bartosz Dziewoński 2013-11-22 13:53:30 UTC
As of Icd7fd1ac (included in MW 1.22) the .close() method is exposed; other methods are not, though. That patch originally aimed to expose the entire object, but Krinkle suggested not to do that.
Comment 2 Lee Worden 2013-11-22 22:06:38 UTC
I'm using one with autoHide:false to report on progress while a brief operation is ongoing.  To do this I'm adding a click() handler to the notification's div, so I can abort the operation if the user closes the notification.  I guess it would also meet my needs if I could give an onclose() callback to mw.notify().

But I'd say expose the object.  It would let developers do more creative things with the notifications.
Comment 3 Alex Monk 2014-02-01 01:54:05 UTC
I guess this bug just needs a decision from Krinkle then?
Comment 4 Bartosz Dziewoński 2014-02-01 02:20:02 UTC
I say let's consider what we have here a consensus and just do it. :D
Comment 5 Gerrit Notification Bot 2014-02-01 02:42:02 UTC
Change 110667 had a related patch set uploaded by Bartosz Dziewoński:
mediawiki.notification: Return the Notification object from .notify calls

https://gerrit.wikimedia.org/r/110667
Comment 6 Gerrit Notification Bot 2014-02-20 08:40:46 UTC
Change 110667 merged by jenkins-bot:
mediawiki.notification: Return the Notification object from .notify calls

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links