Page MenuHomePhabricator

Make hlist part of core
Closed, ResolvedPublic

Description

One of the things mobile did early on in its lifetime was turn off all modules by default to give modules the opportunity to sort out their JavaScript/design (mostly the latter) to be mobile optimised and turn themselves on.

The result of this is various pages are badly styled on mobile as their styles never show up on mobile.

A common pattern I'm noticing /a lot/ is there are lots of lists which are clearly meant to be horizontal lists that are not horizontal lists.

This suggests to me that we have a heap of code debt where there are lots and lots of rules that do the same - make a list horizontal.

I'd like to propose that we make the .hlist class a part of core and go through our extensions using it instead of custom rules where appropriate.

Note that said I know that .hlist has more meaning in various projects - it also introduces additional styling changes such as dots between lists in certain contexts. That said I think we should be striving to reuse as much as possible - and this to me suggests that the community (both wiki and developer) needs to work together to get our css much more organised and reusable.

Thoughts?


Version: unspecified
Severity: normal

Details

Reference
bz51692

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:50 AM
bzimport set Reference to bz51692.
bzimport added a subscriber: Unknown Object (MLST).

I pretty much designed hlist on enwiki to be a drop-in, one-size-fits-all solution. It does not rely on images and has a consistent styling. It drops in on any list type and even handles mixing and nesting types. The CSS can be extended to add different separators.

Making a list horizontal is trivial. Making it look good across the board was the hard part; I've spent weeks fine-tuning it. Other projects have adopted it and I'm surprised mobile has not picked up on it. Instead, they *broke* it several times because they implemented their own minimal implementation that conflicted with enwiki's version.

So yes, I'm pretty much for merging hlist into core.

"Instead, they *broke* it several times because they implemented their own minimal implementation that conflicted with enwiki's version."

This is not quite true nor fair... yes it was minimal but we copied the rule that was being used by hlist as the hlist class is in MediaWiki:Common.css as this useful rule is not deployed to all wikis.

The problem arose when we discovered that hlist also does more than create a horizontal list - it also defines separators that don't apply well in certain contexts. I think we've improved this situation somewhat by adding scoping to the existing rules.

But putting hlist in core would stop these future breakages which is only a good thing.

I just noticed LiquidThreads also uses horizontal lists and would benefit from usage of this class.

  • This bug has been marked as a duplicate of bug 40062 ***