Page MenuHomePhabricator

Use mw.notify for CentralNotice error message
Closed, ResolvedPublic

Description

An error message appearing directly after page load on banner pages [i] displays in a jQuery UI window [ii]. It should use mw.notify [iii] [iv] instead, because the current presentation of the error message is rather uncommon (making the Wikimedia platform less uniform) and annoying (it sits at the center of the screen, without standing out enough for the user to easily identify it, but covering enough content to make reading impossible without closing it). Also, jQuery UI is being deprecated, so code should be moved away from it, and in this case it can be done without losing any functionality, and otherwise considerably improving the UX. mw.notify’s second parameter can also contain a type property that can make the message stand out even more, although the default info type already stands out a lot more than the jQuery UI version.


[i] E.g. https://meta.wikimedia.org/wiki/Special:CentralNoticeBanners/edit/wle_2022_ke
[ii]

CentralNotice error jQuery UI.png (319×1 px, 53 KB)

[iii]
CentralNotice error mw.notify.png (415×480 px, 24 KB)

[iv] https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw-method-notify

Event Timeline

Change 808391 had a related patch set uploaded (by Tacsipacsi; author: Tacsipacsi):

[mediawiki/extensions/CentralNotice@master] Banner editor: use mw.notify

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

Tacsipacsi changed the task status from Open to In Progress.Jun 25 2022, 6:15 PM
Tacsipacsi claimed this task.

Change 808391 merged by jenkins-bot:

[mediawiki/extensions/CentralNotice@master] Banner editor: use mw.notify

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

Looks like there won’t be QA, so going ahead and marking as resolved.