Page MenuHomePhabricator

Remove mediawiki.hlist from core, Collection and Minerva
Open, MediumPublic

Description

Spun out of T42062
MediaWiki core provides a RL module called mediawiki.hlist. The introduction of this module predates TemplateStyles and hasn't really worked out. A modern solution where we designed this from scratch would be to create a single template called HList with stylesheet Template:HList/styles.css

Proposal

  • Editors reduce their reliance on the mediawiki.hlist module on mobile
  • Send a User-notice that the styles will be removed, making clear that MediaWiki:Mobile.css is not an option.
  • The mediawiki.hlist module is removed from the mobile site. Where horizontal lists are needed e.g. menus a much smaller stylesheet will be provided.

Event Timeline

Jdlrobson renamed this task from Wikipedia projects should make use of mediawiki.hlist and not maintain their own .hlist styles to Wikimedia projects should make use of mediawiki.hlist and not maintain their own .hlist styles.Aug 28 2017, 9:35 PM

As I noted in T169315#3735840, mediawiki.hlist is so far very weak compared to Edokter's snippet. Starting with the fact that mediawiki.hlist has '•' as a delimiter (instead of ' • '), which creates disproportionate space if <li> elements are not followed directly one after another without any spaces. ;: lists aren't supported too.

Right now the following wikicode

<div class="hlist">
* element 1
* element 2
** subelement 1
** subelement 2
** very very very very very very very very very very very very very very very very very very very very very very very very long subelement
</div>

which is displayed the following way in enwiki

image.png (46×1 px, 5 KB)

is displayed like this on en.m
image.png (102×933 px, 8 KB)

and like this in enwiki on Minerva skin
image.png (99×936 px, 7 KB)

.hlist-separated doesn't help much, only creating misplaced bullets.

I was going to comment here but it looks like a) I agree with taking this out of core and b) I was going to say a lot of what T213239#4908027 says (or at least the top half). Maybe this should be merged to that task and turned into a "let's figure out what to do" task, especially since this task is connected up to a suspect "move JS to core" whereas hlist is not JS, and because our CSS solutions have moved on (though large wikis have lots of debt to clean).

Jdlrobson renamed this task from Wikimedia projects should make use of mediawiki.hlist and not maintain their own .hlist styles to Work out what to do with mediawiki.hlist.May 24 2021, 4:50 PM
Jdlrobson renamed this task from Work out what to do with mediawiki.hlist to Remove mediawiki.hlist from core and Minerva.Oct 13 2021, 8:53 PM
Jdlrobson updated the task description. (Show Details)

The blessed day for English Wikipedia has come. :)

Now just fleet_count - 1 other wikis that use the class.

Jdlrobson triaged this task as Medium priority.Mar 15 2023, 10:30 PM

I'm not quite sure why the style that is common to everyone is removed from the MediaWiki? I think Edokter's snippet should be implemented.

Jdlrobson renamed this task from Remove mediawiki.hlist from core and Minerva to Remove mediawiki.hlist from core, Collection and Minerva.Jul 13 2023, 6:07 PM
Jdlrobson added a project: Collection.

I'm not quite sure why the style that is common to everyone is removed from the MediaWiki? I think Edokter's snippet should be implemented.

Perhaps this might be a good candidate for any kind of global templates whenever that might arrive, but I don't think it makes sense in MediaWiki core - the issue we found was that skins (e.g. Minerva) would use it, but it would get broken by unexpected local styles on the same class that overrode it.

It's either a stable set of styles that anyone can use, or part of the content and subject to change at any time. Currently it seems like the latter.

It's either a stable set of styles that anyone can use, or part of the content and subject to change at any time. Currently it seems like the latter.

It seems to me that this is a stable set of styles, which seems to (need to be checked) not changed from wiki to wiki for 8 years :)