Page MenuHomePhabricator

Book editor panel must not use #siteNotice wrapper
Closed, DeclinedPublicFeature

Description

Book editor panel must not use #siteNotice wrapper.

  • It semantically does not belong there. #siteNotice is for site notices. Not for other things. Create new sibling after #siteNotice instead.
  • Lot of people turn off all notices by using display:none for #siteNotice which disables the panel.
  • Such wrapper has random styling on local wikis which may override default settings of the panel.

Details

Reference
bz24972

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:08 PM
bzimport added a project: Collection.
bzimport set Reference to bz24972.
bzimport added a subscriber: Unknown Object (MLST).

johannes.beigel wrote:

We're actually using the hook SiteNoticeAfter to render that box, so the #siteNotice ID is inserted by core MediaWiki code. Any ideas what we could use instead?

roland wrote:

This also causes trouble with http://www.mediawiki.org/wiki/Extension:DismissableSiteNotice
If both are enabled and the current SiteNotice was disabled per click, the book editor panel is completely missing.

roland wrote:

Including DismissableSiteNotice before Collection works around the problem for these both extensions, but doesn't solve the main problem.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:00 AM
Aklapper removed a subscriber: wikibugs-l-list.
Jdlrobson-WMF subscribed.

This seems acceptable in 2025. We have been using the siteNotice wrapper for things other than central notice banners e.g. WikidataPageBanner

This seems acceptable in 2025. We have been using the siteNotice wrapper for things other than central notice banners e.g. WikidataPageBanner

So one extension doing it wrong is an excuse for another extension doing it wrong? All the points listed in the description still apply.

The point I was trying to make is that there is a use case here and that skins have been setup to make this an extensible area (in the same way subtitle is now extensible via mw.util.addSubtitle) and that things other than site notices populate this area.

I'm curious: if the hook/element was named something different e.g. Banner and there was a mw.util.addBanner() function and siteNotice was a child element would you feel different?
e.g.

<div id="mw-banner">
   <div id="siteNotice"></div>
   ...
</div>

What specifically if the problem we were hoping to solve with this ticket and can it be resolved at the MediaWiki-Core-Skin-Architecture level rather than the extension level?

I'm curious: if the hook/element was named something different e.g. Banner and there was a mw.util.addBanner() function and siteNotice was a child element would you feel different?
e.g.

<div id="mw-banner">
   <div id="siteNotice"></div>
   ...
</div>

Yes, I would: the mentioned problematic behaviors (points 2 and 3 here as well as the description of T164516 are problems in practice; point 1 here is more of a clean code thing) would continue to apply to #siteNotice, not to #mw-banner, so the siblings of #siteNotice wouldn’t be affected anymore. So it’s a great idea, thanks!