Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Page MenuHomePhabricator

[breaking, April 2022] Plan for eventual removal of styles for messagebox, successbox, errorbox and warningbox classes in mediawiki core
Closed, ResolvedPublic

Description

Historically, many wikis have been known to use the classes successbox, messagebox, errorbox and warningbox inside templates. Confusingly, these classes were added inside MediaWiki core code to markup important system messages that serve a different purpose from article notices, such as the error that displays when you login with an invalid password. In most cases was unintended (T270796#6714564).

Because of this we will be removing all CSS and HTML relating to these classes in MediaWiki core around April 2022.

If you are a template developer, please check that if you using any of these classes that you are not relying on any of the styling rules that come from core to minimize any disruption to gadgets/scripts.

If you are intentionally using these classes and wish to continue to do so, a new method mw.util.messageBox is being considered to support your use case. If it is added, then this method would be considered stable just like mw.util.addPortletLink. Please let us know. Use of the classes is a possibility in the meantime with the caveat that the markup and classes are subject to change in future.

If you have any concerns or questions please feel free to comment on this Phabricator ticket.

Event Timeline

Hi @Jdlrobson Re: User-notice - the 2 usual questions!
What wording would you suggest as the content, and When should it be included? Thanks!

Re: wording - Perhaps something like...

Four CSS classes are being removed from the MediaWiki core code to prevent problems when the same class-names are also used on a wiki. The classes are: successbox, messagebox, errorbox and warningbox. Template developers should check that you are not relying on any of the styling rules that come from core, to avoid any disruption to gadgets/scripts. If you are intentionally using these classes and wish to continue to do so, a new method is being considered - Please let us know at phab:T300314.

Ideally that would be even shorter, but I'm not sure how to reduce it...

Also, ideally we could add a link for the text "new method is available", pointing towards wherever this is documented onwiki (and thus translatable). Thanks!

Quiddity changed the subtype of this task from "Bug Report" to "Task".Jan 28 2022, 12:24 AM
Jdlrobson renamed this task from [breaking] Plan for successbox, errorbox and warningbox classes in mediawiki core to be removed to [breaking, April 2022] Plan for eventual removal of successbox, errorbox and warningbox classes in mediawiki core.Feb 17 2022, 8:32 PM
Jdlrobson updated the task description. (Show Details)

Hi again @Jdlrobson ! Busy day!

  1. Can you think of any way to simplify/shorten the draft I've sketched out above? And, are all the details accurate?
  2. Can I postpone this item until next week (28 Feb. edition), or is it crucial to include it ASAP? (I ask because this week is already very long (https://meta.wikimedia.org/wiki/Tech/News/2022/08) which affects both the effort needed from translators and the likelihood of any given item being overlooked by readers.)

Thanks.

What wording would you suggest as the content, and When should it be included? Thanks!

Perhaps this:

If you are an interface administrator and are intentionally overriding or using the default styles of user feedback boxes (e.g. the classes successbox, messagebox, errorbox and warningbox), please note that these classes and associated CSS will soon be removed from MediaWiki core. Please let us known by commenting on T300314 if you think you might be impacted.

Note I don't think any action is needed from editors, I just want to make sure that community has opportunity to raise any concerns.

I'm a little bit confusing, is it means we are no longer allowed to use something like class="messagebox" etc. in pages and system message? And is there an alternative class for us to replace? I search insource:"class=messagebox" and notice a huge number of usage.

I'm a little bit confusing, is it means we are no longer allowed to use something like class="messagebox" etc. in pages and system message?

No. You can, but you have to provide the styling/CSS yourself. In other words, you should not use class="messagebox" in your scripts/on-wiki pages and expect MediaWiki core to provide the styling.

The "messagebox" class is missing in the title.

Jdlrobson renamed this task from [breaking, April 2022] Plan for eventual removal of successbox, errorbox and warningbox classes in mediawiki core to [breaking, April 2022] Plan for eventual removal of styles for messagebox, successbox, errorbox and warningbox classes in mediawiki core.Mar 3 2022, 9:42 PM

Because of this ...

Not clear why these are being removed. Consider editing the original ticket to elaborate.

a new method mw.util.messageBox is being considered

This patch was marked as abandoned. Should consider editing the original ticket to be clearer about whether or not there's an official replacement. For example, does class="mw-message-box mw-message-box-success" work to replace class="successbox"?