I find it very odd in T259858 that MediaWiki by default will allow site admin to create undismissable site-wide notice for site users. So I tested it and it's true. Probably no site admin want to do that, except as a part of campaign to drive off users from the site. This really hurts the mission of optimum default MediaWiki experience.
A trivial dismiss button seems to be provided by DismissableSiteNotice. But a site admin has to know about that extension and also do the installation chores just to provide what should really be there already (since the notice is baked in core).
I propose that DismissableSiteNotice should be folded to core. Alternatively, the sitenotice mechanism should be moved from core to this extension if that would be better.
The extension is already installed on all Wikimedia wikis, so by virture of that it already meets all the below-stated checklist.
- Passed security review or already Wikimedia deployed
- Voting CI structure tests
- Runs MediaWiki-CodeSniffer
- Runs phan
- Supports MySQL, SQLite, and Postgres (no schema changes)
- GPL v2 or later compatible license
- Extension's default configuration provides optimal experience (this extension is needed to make MW default truly optimal)
- Tested with web installer (not applicable)
Architecture of extension
- One php file for a single hook.
- Two trivial modules: styles and script.
- Four i18n messages, (only 1 is needed in core)
Plan of action
- Provide basic implementation in core - T262118
- Deprecate $wgDismissableSiteNoticeForAnons - T262120
- Undeploy the extension from Wikimedia Beta Cluster - T262122
- Test it on Beta cluster and ensure no lost of functionality - T262122
- Undeploy the extension from Wikimedia production - TBD
- Decide the fate of the extension - TBD
- No visible change to end user regarding site notice and its dimiss button.
- Developers are made aware of the change and the need to uninstall DismissableSiteNotice extension when upgrading to MediaWiki 1.36.
We've had various UBN bugs due to this code not living in core and not being easily testable: