Template talk:Flatlist

message: Many thousands of Wikipedia articles have navboxes, in which lists of links are presented, horizontally, without using list mark-up, but instead using  or suchlike as a kludge. This is semantically poor and has implications for accessibility. 
I created  in an attempt to begin addressing this, but previous discussion (two-and-a-half years ago) petered out before various concerns were resolved. Now that CSS an browsers have moved on, I'd like us to find a solution. Please contribute to centralised discussion on MoS (accessibility). Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 14:02, 28 March 2011 (UTC)
thread_title:  Horizontal lists in navboxes  

message: I tried to do this, and it's not working. Templates like template:First World War treaties:
have parentheticals in them, and this would be an ideal use of nested lists. Not sure about the nested flatlist invocations offered above; I was thinking the two-stars approach, and would like it to produce the same look as the example template, with the lists nested in the page readers get. Be nice if this worked:

 —Portuguese Man o' War 05:09, 16 September 2011 (UTC)
thread_title:  Nested list, again 

message: A discussion on problems with viewing flatlist is underway at Template talk:Navbox#Flatlist problems for anyone interested/able to help. Number 57 22:18, 1 October 2011 (UTC)
thread_title: Viewing problems

message: Is there some nice way to avoid wrapping inside the items when using this template? In the old-style lists, I would do this by using ,  and . How can I achieve similar effect? — Preceding unsigned comment added by Svick (talk • contribs) 14:56, 18 March 2012 (UTC)
replies: text:  is that what you see?  are you asking to have the bullets at the start of each line, rather than at the end of each line? Frietjes (talk) 16:42, 19 March 2012 (UTC)
replies: text:  you could do  and just remove the trailing bullets. Frietjes (talk) 16:44, 19 March 2012 (UTC)
replies: text:  Well, that's not what I see. I'd like to look it exactly the way you see it.  User<Svick>.Talk(); 18:55, 24 March 2012 (UTC)
replies: text:  what I see is basically what I have in put up above.  I suppose if you really wanted to force nowrap, you could just put a  around each entry.  it seems this is an IE problem, as pointed out by Edokter.  Frietjes (talk) 16:46, 25 March 2012 (UTC)
thread_title:  Wrapping 

message: Please someone help me to make them delete this horrible template, i can't with this. --ImtheNeonLight (talk) 21:59, 24 May 2013 (UTC)
replies: text: User is now indef blocked. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 12:47, 4 October 2013 (UTC)
thread_title:  Template deletion 

message: I'm trying to use nested lists in a navbox like this (see User:Gazibara/sandbox#References). The second list (the one under Subtraction) is a true nested list, while the first is not. I am dissatisfied by both looks. In fact, I would like to have something like:
Integer: ADD • ADC • ADCX • ADOX; Floating-point: FADD • FADDP; Mixed: FIADD
I can do it without a list (as I did it above), I can do it in HTML using nested lists and CSS, but I want to do it using wiki markup without user CSS. Any ideas?
Gazibara (talk) 11:22, 12 November 2014 (UTC)
replies: text: Try using the wikimarkup for a definition list. -- User:Edokter  12:33, 12 November 2014 (UTC)

text: Gazibara, to be clear, you are dissatisfied with the bullets between "ADOX" and "floating-point" and and between "FADDP" and "Mixed" and would rather they were semicolons? Frietjes (talk) 20:52, 13 November 2014 (UTC)
replies: text: See  of the looks he doesn't like. -- User:Edokter  21:26, 13 November 2014 (UTC)

text:  Frietjes, after I tried using definition list instead of unordered list, I got a far better result, as you can see from the current version. It would be nice to replace the bullet before the bold text with a semi-colon or some other visually different symbol (e.g. a fatter bullet or ⁘ (U+2058) or ※ (U+203B)), but it's nice as it is as well. Gazibara (talk) 07:51, 14 November 2014 (UTC)
replies: text:  okay, thanks for the update.  a different delimiter is possible, but would be fairly complicated to implement, and probably not worth the effort at this point. Frietjes (talk) 18:08, 14 November 2014 (UTC)
thread_title: Formatting of nested lists in navboxes

message: This template doesn't work on the Welsh Wikipedia, though the code is the same as on the English (as is the documentation). What's missing from cy.wikipedia.org? Ham (talk) 13:49, 28 November 2014 (UTC)
replies: text: Ham, check MediaWiki:Common.css vs. :cy:MediaWiki:Common.css.  in particular search for ".hlist" in the one here, and copy all those sections over to the Welsh WP. Frietjes (talk) 15:29, 28 November 2014 (UTC)

text: Ham, there is also some javascript in MediaWiki:Common.js that you probably want as well (fixes a trailing dot issue). Frietjes (talk) 15:32, 28 November 2014 (UTC)
replies: text:   It's not the template; the problem is that :cy:MediaWici:Common.css has no rules concerning the hlist class. It may be possible to copy them from MediaWiki:Common.css. You'll need administrator rights to do that;  (:cy:Sgwrs Defnyddiwr:Llywelyn2000) should be a good one to ask. --Redrose64 (talk) 15:34, 28 November 2014 (UTC)
replies: text: Brilliant, quick response! Thanks to all of you; yes both css files were over two and a half years old, cob-webed and very dusty! We need a tool to copy automatically! Llywelyn2000 (talk) 22:36, 28 November 2014 (UTC)
thread_title:  This template on cywiki 

message: was misbehaving, displaying the passed CSS style parameters rather than implementing them (see , click on [show] for "Nerve"). Maybe an un-named positional parameter  used to work? Now it is apparently only accepted as a named parameter . Easy enough to fix but I wonder how many other invocations need that too. Can we create a maintenance category something like  to track them down? DMacks (talk) 06:12, 28 April 2015 (UTC)
replies: text: It has never accepted  as an unnamed parameter, and as far as I can tell, no template ever has; it is always explicitly named. The first unnamed parameter, if present, is usually used to pass content. -- User:Edokter  08:41, 28 April 2015 (UTC)

text: IIRC this was because some years ago a forked template was created that took the list as the second parameter (instead of the first), and as you say, took the style info as the first; this forked template was later merged back in. I thought we fixed up all the usage; maybe somebody thought that the forked template still existed and didn't preview before saving. I'll need to dig around to be sure. --Redrose64 (talk) 09:06, 28 April 2015 (UTC)
replies: text: Got it. It was a Sardanaphalus hack-up from just over a year ago, see Template:Startflatlist and Template:Startplainlist. --Redrose64 (talk) 09:54, 28 April 2015 (UTC)
replies: text: Wow, what a deep mess. I guess I'll just make a mental note in case I see it visible again. DMacks (talk) 14:19, 28 April 2015 (UTC)
replies: text: He created hundreds of such template 'redirects' and managed to get some of them transcluded in 1000s of articles. I'm still cleaning up after him. He is template-banned now, so if you see any template-related edits of his, just revert them. I'll deal with the mess. -- User:Edokter  14:26, 28 April 2015 (UTC)
thread_title:  Un-named parameter check 

message: Everywhere I see this template in use, there's an added bullet point that follows the last item in each list. However, I'm certain this bullet wasn't there a few days ago. What happened, and can it be changed back? User:SubZeroSilver (talk) 19:20, 10 October 2017 (UTC)
replies: text: It has been fixed. Thank you. User:SubZeroSilver (talk) 13:12, 11 October 2017 (UTC)
replies: text: Wikipedia:Village pump (technical)#Navbox templates / hlist issue? is related. --Redrose64 🌹 (talk) 15:09, 11 October 2017 (UTC)
thread_title:  Problem with extra bullet point 

message: Hi, could the html markup in this template be fixed? See https://en.wikipedia.org/w/index.php?title=Template:Flatlist/sandbox&oldid=807871376 for a correct fix where the div is closed outside the if section instead of adding an extra closing div in the noinclude section.
 Tholme (talk) 15:54, 30 October 2017 (UTC)
replies: text: I'm not sure your change is correct. When used without parameters, typically using the redirect , the template is required to leave the div open so that the end of the list can be marked with . -- John of Reading (talk) 17:09, 30 October 2017 (UTC)
replies: text: You are right, so don't do the change. Tholme (talk) 17:35, 30 October 2017 (UTC)
thread_title:  Template-protected edit request on 30 October 2017 

message: Raised Wikipedia:Village pump (technical)#Template:Flatlist does not display correctly on mobile in case if anyone is not aware. ネイ (talk) 16:45, 24 May 2020 (UTC)
replies: text: I added the class hlist-separated, which is present in  and appears to make bullets render in mobile. Report any bugs here. – Jonesey95 (talk) 17:57, 24 May 2020 (UTC)
replies: text:   Nested flatlists do not display closing parentheses on mobile; see for example "People or cargo transported" in the infobox at Atlas V. I get the same issue with , I'm guessing because they use the same class.  Hairy Dude (talk) 14:44, 20 February 2022 (UTC)
replies: text: I don't know if second-level asterisks are formally supported in this template. I have added a case to the testcases, showing that there are missing closing parens after "Curiosity" and "Quasar" in mobile view. – Jonesey95 (talk) 18:25, 20 February 2022 (UTC)
replies: text: One note: Removing "hlist-separated" from the class declaration removes the bullets and restores the closing parens. See the sandbox version in the mobile testcases link above. – Jonesey95 (talk) 23:16, 20 February 2022 (UTC)
replies: text: li:after is different in MediaWiki:Mobile.css than what is in MediaWiki:Common.css. -- WOSlinker (talk) 23:54, 20 February 2022 (UTC)

text: I don't know why it's like this or why it's important. Sigh. Yes, that would be the issue. Izno (talk) 00:14, 21 February 2022 (UTC)
replies: text: The relevant task is probably phab:T174399. Izno (talk) 00:15, 21 February 2022 (UTC)
replies: text: , based on the age of these phab tickets (see also the ill-fated ), it looks like we are on our own. Would it help to have a custom styles.css file for this template? – Jonesey95 (talk) 00:23, 21 February 2022 (UTC)
replies: text: Yes, but that's after MediaWiki talk:Common.css/to do#Hlist is done. I haven't laid out everything that needs to happen there yet, but getting that 5k listed down to false positives would be a good start. Izno (talk) 00:50, 21 February 2022 (UTC)
replies: text: Izno, that 5k list is only 1k if you ignore the Wikipedia:Main Page history subpages (or treat them as a separate set). -- WOSlinker (talk) 15:27, 22 February 2022 (UTC)
replies: text: As I said, haven't done a lot of work with the hlist case. If that knocks out 4k, that works for me. Feel free to leave a link in the working section with the refined search. Izno (talk) 18:05, 22 February 2022 (UTC)

text: I've fixed this in mobile.css. We'll probably have to refix it when we get around to deploying the TemplateStyles version because when we do I want to review what hlist-separated is actually doing. Izno (talk) 22:43, 6 March 2022 (UTC)
replies: text: For the record, this edit shows the current workaround for this goofiness. – Jonesey95 (talk) 02:40, 7 March 2022 (UTC)
thread_title:  Display issue on mobile version 

message: Is there a purpose for the seemingly stripped </div> after the <noinclude>? —Anomalocaris (talk) 22:59, 22 December 2020 (UTC)
replies: text: I think it's because there is no  in the template page itself. When you say "seemingly stripped", what do you mean? To me, it appears to match the opening tag just fine, but it is needed only on this page (hence the noinclude tag). Is that closing tag causing an error somewhere? – Jonesey95 (talk) 00:18, 23 December 2020 (UTC)
replies: text: I see </div> just before }} and then another one inside </div>..., which, to my naive eye, seems to be stripped. I think you were trying to explain this to me above, so maybe you'll have to explain it at a more basic level, since I don't know why I should care about . Anomalocaris (talk) 23:14, 28 December 2020 (UTC)
replies: text: The template may be used in two differing ways: (i) like the first example at Template:Flatlist#Examples, where the entire list is passed into  through its  parameter; (ii) like the example at Template:Flatlist#Alternative syntax, where the list is placed between  and . In the case of (i), the single use of  wraps the list in , which is a balanced tag pair; in the case of (ii), the  produces an unclosed  tag, and this is closed by the  which produces the balancing  tag (and nothing else). Now Template:Startflatlist is merely a redirect to Template:Flatlist, so the second example may be written 
* cat
* dog
* horse
* cow
* sheep
* pig
</div> and this shows that when  is used without parameters, some form of explicit closure is required, which is why there is that  after the . --Redrose64 🌹 (talk) 10:04, 29 December 2020 (UTC)
replies: text: Redrose64: Thank you for explaining it so clearly. —Anomalocaris (talk) 10:45, 1 January 2021 (UTC)
thread_title:  Why the extra closing tag?