Page MenuHomePhabricator

Confusion around hlist-separated and expectations of how hlist should render in MinervaNeue skin
Closed, DeclinedPublic

Description

The hlist-separated class is apparently required for hlists to display properly in mobile. Without it, the bullets don't display for some reason, even though an :after declaration is included in the enwiki Mobile.css. This is not a good idea, especially since no one thought to inform any editors about the class except in a short note hidden in the middle of Mobile.css (I only discovered it 25 minutes ago, and all of its uses on enwiki were added by me).

<big>Add the styling to the hlist class instead.</big> It means that hlists will actually display with the dots, and is better than making editors add hlist-separated everywhere.

Note that the code for hlist-separated still needs fixes, partially due to the list padding problems (see T169320) and the bullet being an image which doesn't change colour along with the rest of the text (doesn't really work for navbars, which are often used over coloured backgrounds). The padding should be controlled entirely by the hlist-specific CSS class instead of by the CSS added to all list items, since otherwise it probably won't be aligned perfectly in the middle of two items. There's probably a way to replace the bullet with a div with border-radius, but using the middot like normal hlists should be good enough (see comment).

Village pump discussion: https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Hlist_bullets_not_shown_in_mobile

Problematic articles

Notice the lack of separators in mobile in 'Occupation'

image.png (778×326 px, 190 KB)

Using the hlist-separated class bullets appear blue:

Screen Shot 2017-08-03 at 12.54.25 PM.png (90×344 px, 13 KB)

A temporary workaround is being used on Wiki (https://en.m.wikipedia.org/wiki/Special:MobileDiff/793762196)

Screen Shot 2017-08-08 at 8.59.00 AM.png (422×338 px, 49 KB)

Proposal (not yet approved by design)

Event Timeline

Oh, and the bullets in the hlist-separated class don't change colour since they're not text. I understand that the Unicode · character might not render properly, but practically every browser made after the release of IE 7 should be able to display it. Anything before it probably doesn't have HTTPS so WMF sites won't work anyway.

This is a class provided by the Minerva skin.
It's not entirely clear what the problem is here. Can you provide some example URLs of where you are seeing the problem? Preferably with some screenshots?

Jdlrobson renamed this task from Mobile skin hlist-separated class is undocumented and unnecessary to Confusion around hlist-separated and expectations of how hlist should render in MinervaNeue skin.Aug 1 2017, 11:51 PM

(The hlist class is necessary as in the mobile menu and other places we do not use separators but margins and we use this as a way to make sure separators do not show )

Jdlrobson updated the task description. (Show Details)
Jdlrobson edited projects, added Web-Team-Backlog (Design); removed Web-Team-Backlog.

@Nirzar this is being fixed by an on wiki style for the time being. Let me know how we can improve appearance or if we should just include those styles in the skin itself...Feel free to ping me on IRC if you need more context!

If the menus and other places need to have a horizontal list without bullets, shouldn't the menus and other places then use a different CSS class? Something similar to the desktop hlist is used in the mobile footer anyway, so it's not as if the style had to be changed. The Vector footer also uses margins instead of bullet separators, so something similar to Vector's

div#footer ul {
 list-style-type:none;
 list-style-image:none;
 margin:0;
 padding:0
}
div#footer ul li {
 margin:0;
 padding:0;
 padding-top:0.5em;
 padding-bottom:0.5em;
 color:#333;
 font-size:0.7em
}

could be done in Minerva instead of reusing hlist.

There are 3 hlist usages in Minerva - the edit buttons, the icons in the main menu and the footer. The footer is the exception - the only one which needs separators - hence why the class was created for that purpose. I'm not a designer so I'd rather get some input from one about the usages in content to know how they should appear and then with that information we can revisit that decision if necessary.

@Jdlrobson AFAIK most heavy editors use the desktop site (it is almost impossible to write complex wikicode and Lua on a phone), so the use of the hlist class is likely to indicate that a list should look how it looks in Vector using enwiki's common.css rules. I think the easiest way to solve the issue would be to rename the hlist class used in the Minerva menus to something else, change the class used in the menus to the renamed class, and then rename Minerva's hlist-separated class to hlist. (A DuckDuckGo search gives the two bugs I filed as the only uses of the term "hlist-separated", so it's probably not used on any other websites.)

Change 383157 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Hlist tweaks (size and color)

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

Change 383157 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Hlist tweaks (size and color)

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

Will remove Mobile.css styles on 12th.

Jdlrobson claimed this task.

I've removed the styles now.

It seems the idea is to avoid the en.wp MediaWiki:Common.js definition to bleed into minerva ?

1: It's usage is not limited to the #content area I suspect..
2: When increasing specificity, you should do it for the entire group of interconnected definitions.

Owch.

It seems the idea is to avoid the en.wp MediaWiki:Common.js definition to bleed into minerva ?

Yes. Annoyingly, MediaWiki:Common.css makes little sense now as the Minerva skin HTML is radically different from the rest of skins.

When increasing specificity, you should do it for the entire group of interconnected definitions.

Sure, but the MediaWiki:Common.css format makes this more risky than it should be. Ideally I'd rather not use these at all. There was an RFC a while back about scoping MediaWiki:Common.css or at least having interface styles in a MediaWiki:UI.css

Edokter at enwiki has done a huge job implementing .hlist class, it's very well-designed. Many wikis use it, including eswiki, ruwiki, frwiki. Why should this Minerva novelty, consisting of a few rules, replace it, making local technicians have to do a huge job resolving the conflict and/or replacing .hlist with .hlist-separated all over the site? Couldn't it just receive another name and/or be limited to Minerva interface area?

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. Note that lists created with ;: work great in both places, as they are not conflicting with mediawiki.hlist.