Home
Random
Log in
Settings
About The Republic Wiki
Disclaimers
The Republic Wiki
Search
Editing
Module talk:List
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
The edit appears to have already been undone.
Anti-spam check. Do
not
fill this in!
{{oldtfdfull|date= 2019 January 4 |result=no consensus |disc=Module:Cslist}} {{WikiProject banner shell| {{WikiProject Lists}} }} {{copied|from=Module:List|from_oldid=794511725|to=:incubator:Module:Wp/nod/List|to_diff=4241044}} {{bigger|[[Module:List/testcases/template|''Tests via template calls'']]}} ==Ordered not working== See [[Template talk:Ordered list#Not working]]. Very apparent on this module's documentation page. <span style="font-family:'Trebuchet MS'"> โ [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) โ </span> 13:07, 24 November 2013 (UTC) :Sorry, that was a variable clash. Should be fixed now. โ '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|โช talk โช]]</sup> 13:26, 24 November 2013 (UTC) ::And now I've written some [[Module:List/testcases|test cases]] which should catch things like this in the future. Better late than never, I suppose... โ '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|โช talk โช]]</sup> 14:21, 24 November 2013 (UTC) :::Nice. I see some minor issues with list_style_type though. <span style="font-family:'Trebuchet MS'"> โ [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) โ </span> 14:27, 24 November 2013 (UTC) ::::Do you mean the Greek letters in the unbulleted table of the test cases? I can have a go at fixing that. โ '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|โช talk โช]]</sup> 14:36, 24 November 2013 (UTC) :::::Now fixed - let me know if there's anything else that you spotted. โ '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|โช talk โช]]</sup> 15:00, 24 November 2013 (UTC) ::::::Seems to only fire with |ordered now, but not |bulleted. Is that by design? <span style="font-family:'Trebuchet MS'"> โ [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) โ </span> 16:32, 24 November 2013 (UTC) :::::::{{ping|Edokter}} I wasn't seeing any difference for my tests with {{tag|ul}} and list-style-type, so I assumed that it wasn't supposed to enabled for ul in MediaWiki and that there was no need to include it. But if it's supposed to be included, or we could change the backend somewhere to make it work, then it will be easy enough to enable it for bulleted lists too. โ '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|โช talk โช]]</sup> 10:31, 26 November 2013 (UTC) :{{od|6}} It should basically behave as normal lists behave within MediaWiki. After some testing, I found that list-style-type indeed only works with ordered lists. Unordered lists work with the bullet image disabled (list-style-image overrides list-style-type). So it's not broken. <span style="font-family:'Trebuchet MS'"> โ [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) โ </span> 18:03, 26 November 2013 (UTC) ::{{ping|Edokter}} That sounds fair enough - we shouldn't be trying to second-guess the MediaWiki software, I suppose. So, just to be doubly sure, it looks like you want me to revert to [https://en.wikipedia.org/w/index.php?title=Module:List&oldid=583088677 this version] ([https://en.wikipedia.org/wiki/Special:ComparePages?page1=&rev1=583098500&page2=&rev2=583088677&action=&diffonly=&unhide= diff]). Have I understood you correctly? โ '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|โช talk โช]]</sup> 01:56, 28 November 2013 (UTC) :::All I can say is it behaves as expected in its current form. <span style="font-family:'Trebuchet MS'"> โ [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) โ </span> 10:50, 28 November 2013 (UTC) ::::Well, that sounds good enough for me. Thanks. :) โ '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|โช talk โช]]</sup> 11:30, 28 November 2013 (UTC) == horizontal_ordered and start value == Following a litle discussion at [[MediaWiki talk:Common.css#ordered list start with hlist]], there is a way to specify a start value for ordered horizontal lists. My lua knowledge leaves to be desired but the solution is quite simple. When <code>ordered</code> and <code>start=3</code> is passed, the module outputs {{tag|ol|o|params=start="3"}}. When <code>horizontal_ordered</code> is given with <code>start=3</code>, it should (also) output {{tag|ol|o|params=style="counter-reset: listitem 2;"}} instead. And yes, you need to substract 1. <s>For unknown reason, it does not work in IE8, which it should do so in theory, but who cares.</s> <span style="font-family:'Trebuchet MS'"> โ [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) โ </span> 19:31, 6 January 2014 (UTC) :I've added it to the module, as well as switching the module to use [[Module:Arguments]] for argument processing. It's looking very nice - thank you for the fix! โ '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|โช talk โช]]</sup> 03:18, 7 January 2014 (UTC) ::Thank you for implementing it. It works exactly as advertised. <span style="font-family:'Trebuchet MS'"> โ [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) โ </span> 11:16, 7 January 2014 (UTC) == Parameter names == Hello. For the sake of consistency with the parameter-naming pattern used in {{tl|Navbox}}, {{tl|Infobox}}, {{tl|Sidebar}} etc, I've tried adding the alternate parameter names ''liststyle'', ''itemstyle'' and ''itemNstyle'' to [https://en.wikipedia.org/w/index.php?title=Module:List/sandbox&oldid=622045436 this] version of the sandbox (current as of this message). As they seem to work, is it okay to add them to and start using them with the live version? [[User:Sardanaphalus|Sardanaphalus]] ([[User talk:Sardanaphalus|talk]]) 20:34, 31 August 2014 (UTC) :That would be the third variation of those parameter names to be allowed. This is getting a bit out of hand. This is not a user-usable template but a meta module, so I don't see the need. <code style="white-space:nowrap">-- [[[[User:Edokter|<span style="color:#006">User:Edokter</span>]]]] {{[[User talk:Edokter|<span style="color:#060">talk</span>]]}}</code> 21:04, 31 August 2014 (UTC) :* ''"For the sake of consistency with the parameter-naming pattern used in {{braces|Navbox}}, {{braces|Infobox}}, {{braces|Sidebar}} etc..."''.<br/>If three sets of names is too many, replace/remove one (or even both) of the other two. [[User:Sardanaphalus|Sardanaphalus]] ([[User talk:Sardanaphalus|talk]]) 00:15, 1 September 2014 (UTC) ::*That would surely break backward compatibility with some templates. I'm all for consistency, but that is not always possible wihtout either too many variations or breaking too many legacy templates. <code style="white-space:nowrap">-- [[[[User:Edokter|<span style="color:#006">User:Edokter</span>]]]] {{[[User talk:Edokter|<span style="color:#060">talk</span>]]}}</code> 11:40, 1 September 2014 (UTC) :::* Sorry not to've got back to your reply until now. If compatibility needs to be maintained โ yes โ but three sets of names is too many, how about: ::::# Add the more consistent set as a third set, but only temporarily while... ::::# ...a bot is tasked to rename instances from one of the other sets, meaning that... ::::# ...that other set may then be removed, restoring the two-set limit...? ::::[[User:Sardanaphalus|Sardanaphalus]] ([[User talk:Sardanaphalus|talk]]) 11:32, 8 September 2014 (UTC) :::::I'm not going to do it. Also, modules are not templates; perhaps it is a ''good'' thing that module parameters have a different naming scheme to prevent potential conflicts and confusion. <code style="white-space:nowrap">-- [[[[User:Edokter|<span style="color:#006">User:Edokter</span>]]]] {{[[User talk:Edokter|<span style="color:#060">talk</span>]]}}</code> 16:07, 8 September 2014 (UTC) :::::* In that case, can the templates that call Module:List ({{tlbare|hlist}}, {{tlbare|ublist}}, etc) include conversions such as ''liststyle'' โ ''list_style'', ''itemNstyle'' โ ''itemN_style'', etc? [[User:Sardanaphalus|Sardanaphalus]] ([[User talk:Sardanaphalus|talk]]) 21:45, 9 September 2014 (UTC) == Unbulleted list doesn't work in another wiki. == Hello, I copied this module to Lithuanian Wikipedia, but the '''unbulleted''' doesn't seem working properly (haven't tried others). Can someone explain why? [https://lt.wikipedia.org/wiki/%C5%A0ablonas:S%C4%85ra%C5%A1as_be_punkt%C5%B3/testcases Here] is the testcases page. Any help would be appreciated.--[[User:Zygimantus|Zygimantus]] ([[User talk:Zygimantus|talk]]) 15:30, 1 October 2015 (UTC) :You need to copy some classes from [[MediaWiki:Common.css]], most notably <code>.hlist</code> and <code>.plainlist</code>. <code style="font-size:small;white-space:nowrap">-- [[[[User:Edokter|<span style="color:#006">User:Edokter</span>]]]] {{[[User talk:Edokter|<span style="color:#060">talk</span>]]}}</code> 16:08, 1 October 2015 (UTC) ::Thank you very much, we changed Common.css now it works.--[[User:Zygimantus|Zygimantus]] ([[User talk:Zygimantus|talk]]) 19:31, 1 October 2015 (UTC) == Redundant div? == Why is {{tl|Unbulleted list}} generating <code><nowiki><div class="plainlist"><ul>...</ul></div></nowiki></code> when <code><nowiki><ul class="plainlist">...</ul></nowiki></code> should suffice? it seems to have something to do with <code>renderList(data)</code>, mentioned in [[Module:List]]. {{U|Redrose64}} pointed out, "as it's a module, I rather suspect that several templates use it, so one of those may need the enclosing {{tag|div}}." That's likely true, but I'm wondering if there's a way to have it only generate a div when asked to. It's better to have a small bit of extra code in a module than to have unneeded markup being sent out thousands of times per minute. <span style="white-space:nowrap;font-family:'Trebuchet MS'">โโโฏ[[User:SMcCandlish|'''SMcCandlish''' โบ]] [[User talk:SMcCandlish|โ]] [[Special:Contributions/SMcCandlish|ยข]]โโฝ<sup>ส</sup>โฑทา <sub>แดฅ</sub>โฑท<sup>ส</sup>โผโ</span> 23:44, 5 September 2016 (UTC) :{{ping|SMcCandlish}} As far as I'm aware, it's redundant. I added the extra div to the module because that's the way all the old templates were, but I don't see any other particular reason why it should be so. If we want to change it we should be careful, though - for example, there could be CSS selectors in user scripts or gadgets that depend on the div being there in the HTML. โ '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|โช talk โช]]</sup> 23:56, 28 February 2017 (UTC) ::{{ping|Mr. Stradivarius}} I don't see a practical means of "being careful" other than changing it and being willing to change it back, or otherwise work with them, if people say something broke. <span style="white-space:nowrap;font-family:'Trebuchet MS'">โโโฏ[[User:SMcCandlish|'''SMcCandlish''' โบ]] [[User talk:SMcCandlish|โ]] [[Special:Contributions/SMcCandlish|ยข]]โโฝ<sup>ส</sup>โฑทา <sub>แดฅ</sub>โฑท<sup>ส</sup>โผโ</span> 23:50, 3 March 2017 (UTC) == Negative numbers == Is it possible to have negative numbers with correct typographic minuses (โ) instead of hyphens (-)? As I understand, the current implementation uses built-in HTML numbering, which is not aware about proper formatting (outputs โ1 as "-1" and does not even understand "โ1" in the value property). Can it be modified somehow (to have it still as a list rather than emulating with a table) to get the proper formatting? If not, what is the best alternative? โ [[User:Mikhail Ryazanov|Mikhail Ryazanov]] ([[User talk:Mikhail Ryazanov|talk]]) 20:16, 28 February 2017 (UTC) :We should use semantically valid HTML. This means using [//www.w3.org/TR/html5/grouping-content.html#the-ol-element the <code>ol</code> element] to enclose one or more [//www.w3.org/TR/html5/grouping-content.html#the-li-element <code>li</code> elements] like this: <ol type=1 start=-2><li>Minus Two<li>Minus One<li>Zero<li>Plus One<li>Plus Two</ol> What your browser does with those <code>li </code>elements is largely outside our control - we can specify start value - this is the <code>start=-2</code> attribute here; also whether numbers (decimal or Roman) or letters are to be used (also if capitals should be used for Roman numerals or letters) - this is the <code>type=1</code> attribute here. What we cannot do is specify how a minus sign is to be displayed. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] 🌹 ([[User talk:Redrose64|talk]]) 20:36, 28 February 2017 (UTC) ::Well, yesย โ it seems that HTML/CSS does not give any control for how the list markers are displayed (and <code>::marker</code> is not supported anywhere). Then the question is: can this be emulated using <code><dl></code> with some styling to match the <code><ol></code> format? Or I really have to use a table? โ [[User:Mikhail Ryazanov|Mikhail Ryazanov]] ([[User talk:Mikhail Ryazanov|talk]]) 01:14, 1 March 2017 (UTC) :::Again, we should use ''semantically valid'' HTML. :::*[//www.w3.org/TR/html5/grouping-content.html#the-ol-element The <code>ol</code> element] represents a list of items, where the items have been intentionally ordered, such that changing the order would change the meaning of the document. :::*[//www.w3.org/TR/html5/grouping-content.html#the-dl-element The <code>dl</code> element] represents an association list consisting of zero or more name-value groups (a description list). :::*[//www.w3.org/TR/html5/tabular-data.html#the-table-element The <code>table</code> element] represents data with more than one dimension, in the form of a table. :::If the information is an ordered list of items, we use the the <code>ol</code> element, and must not use a different element for other than its intended purpose. Quite apart from appearance, we must consider [[WCAG|accessibility]]. :::It would help greatly if you gave an example of the page(s) where you are having these difficulties. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] 🌹 ([[User talk:Redrose64|talk]]) 10:19, 1 March 2017 (UTC) ::::I totally agree that we should strive for semantically correct and accessible code, and that is why I was asking how to achieve a typographically correct appearance while still keeping the list as a list (in this respect a description list is a general case of a numbered list). The particular example of the problem is in [[Absement#Higher_integrals]]. โ [[User:Mikhail Ryazanov|Mikhail Ryazanov]] ([[User talk:Mikhail Ryazanov|talk]]) 23:50, 1 March 2017 (UTC) :::::There is a [http://www.w3.org/TR/2011/WD-css3-lists-20110524/ working draft] for CSS to allow customisation of the negative sign in ordered lists, but unfortunately it [https://developer.mozilla.org/en-US/docs/Web/CSS/@counter-style/negative only currently has support in Firefox]. โ '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|โช talk โช]]</sup> 02:46, 2 March 2017 (UTC) ::::::Looks interesting, but why even Firefox does not understand <code>type</code> and <code>glyphs</code> from the W3C draft, requiring its own <code>system</code> and <code>symbols</code> instead? ::::::Anyway, it seems that <code><ol></code> should be considered literally ''[[totally ordered set|ordered]]'' rather than ''numbered'', since copy-pasting such lists completely looses the numbers in plain-text mode and loses the numbering system (just renumbers the copied items as "1.", "2.", "3.", ...) in reach-text mode (at least, this is what VisualEditor here does), so it is quite useless/harmful when the actual numbering is important. โ [[User:Mikhail Ryazanov|Mikhail Ryazanov]] ([[User talk:Mikhail Ryazanov|talk]]) 05:30, 2 March 2017 (UTC) :::::::The doc linked by Mr. Stradivarius is a W3C Working Draft; that means that it is a long way from being accepted as a W3C Recommendation (see World Wide Web Consortium Process Document [//www.w3.org/2017/Process-20170301/#maturity-levels section 6.1.2 Maturity Levels]), and so browser vendors like Mozilla are under no obligation to implement any of [//www.w3.org/TR/2011/WD-css3-lists-20110524/ that proposal]. Indeed, it may change significantly before adoption, or even be cropped entirely and wind up as a Working Group Note. :::::::The tag name {{tag|ol}} stands for "ordered list". It implies nothing about numbering; indeed, a list which is ordered yet not numbered might be <ol type=A><li>No trump<li>Spades<li>Hearts<li>Diamonds<li>Clubs</ol> :::::::When you copypaste one or more items of a HTML list (ordered or otherwise), whether the item markers are copied or not is browser-dependent. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] 🌹 ([[User talk:Redrose64|talk]]) 17:32, 2 March 2017 (UTC) ::::::::Are you a mathematician<!--from the joke about a hot-air balloon-->? ;โ) ::::::::Although the current standard does not call it "numbered" explicitly, the numbering is implied by the presence of the <code>start</code> attribute and that the items have ordinal values, which form a continuous sequence. (The draft from 19 October 2010 is more explicit, [https://www.w3.org/TR/2010/WD-html-markup-20101019/ol.html#ol.attrs.start saying]: "The start attribute on the ol element was deprecated in a previous version of HTML, but is no longer deprecated, as it has meaning and is not simply presentational.") ::::::::In any case, do you have any suggestions about the example that I gave above? โ [[User:Mikhail Ryazanov|Mikhail Ryazanov]] ([[User talk:Mikhail Ryazanov|talk]]) 04:09, 4 March 2017 (UTC) == :after == I want to apply a style to all items (''item_style''), but ''after'' them. Final product should be like: <pre>.hlist li:after{content:"-after"}</pre> Is there some option, how to achieve this? --[[User:Dvorapa|Dvorapa]] ([[User talk:Dvorapa|talk]]) 17:43, 1 May 2017 (UTC) == bulleted list == I'd like to make a bulleted list in a table using {{tlx|bulleted list}} (or equiv result), but with a "bullet" that is smaller and/or rounder, not the standard square bullet. Such as with {{โข}} .. Is it possible to change bullet caliber? -- [[User:GreenC|<span style="color: #006A4E;">'''Green'''</span>]][[User talk:GreenC|<span style="color: #093;">'''C'''</span>]] 01:11, 2 May 2018 (UTC) :The ''default'' bullet is set in the sitewide CSS and is not adjustable. There are also no CSS properties which will alter the size of a bullet, which is largely browser-dependent. But it is possible to replace the bullet with an image, using [//www.w3.org/TR/CSS21/generate.html#propdef-list-style-image the <code>list-style-image:</code> property], and images may be drawn to any practical size. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] 🌹 ([[User talk:Redrose64|talk]]) 08:02, 2 May 2018 (UTC) ::Would <code>list-style-image</code> be globally adjustable, such as in the Lua module, or only local CSS? I'm not too familiar with CSS but see <code>data.listTag = 'ul'</code> defined in the module. What would happen if it was changed to <code>ul { list-style-image: url("https://commons.wikimedia.org/wiki/File:Vector-bullet-icon.svg") }</code> (the icon image of {{โข}}). -- [[User:GreenC|<span style="color: #006A4E;">'''Green'''</span>]][[User talk:GreenC|<span style="color: #093;">'''C'''</span>]] 13:57, 2 May 2018 (UTC) == Nested list bug? == <syntaxhighlight lang="moin">{{hlist|1|2|3|{{hlist|A|B|C}}}}</syntaxhighlight> '''Expected output (approximated):''' 1 * 2 * 3 (A * B * C) '''Real output:''' {{hlist|1|2|3|{{hlist|A|B|C}}}} Is the nested list supposed to go to a new line? This seems like unexpected behavior, especially since I thought the semantic of nesting an hlist inside another was supposed to be a *sublist*. That is, A,B,C should not have a * separator from 3. Also, should it be inserting a newline at the front of the list, too, as it is now? [[User:Lethargilistic|lethargilistic]] ([[User talk:Lethargilistic|talk]]) 09:12, 21 August 2018 (UTC) : {{U|Lethargilistic}}, note that you probably don't want the bar between the "3" and the nested list. however, that aside, if you put your example through [[Special:ExpandTemplates]], you get <syntaxhighlight lang="html"><div class="hlist hlist-separated"><ul><li>1</li><li>2</li><li>3</li><li><div class="hlist hlist-separated"><ul><li>A</li><li>B</li><li>C</li></ul></div></li></ul></div></syntaxhighlight> which has no extra new line. the issue is most likely the extra {{tag|div}} inside the list. this could be potentially fixed by removing the {{tag|div}} and moving the class specifiers into the {{tag|ul}}. I'm not sure why these need to be in a separate {{tag|div}} container. another option could be to add "display:inline" to the div. to do this, you would want to make changes at [[MediaWiki:Common.css]], since it would be better to put that in the hlist class directly. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 14:33, 21 August 2018 (UTC) :: OK, thanks! I'll move the bug over to [[MediaWiki talk:Common.css]]. [[User:Lethargilistic|lethargilistic]] ([[User talk:Lethargilistic|talk]]) 21:18, 21 August 2018 (UTC) == Nested list broken == '''Wikitext:''' <nowiki>{{Ordered list |First item | *Second item *is a nested list *of multiple items}}</nowiki> '''Expected result:''' <ol><li>First item </li><li> *Second item *is a nested list *of multiple items</li></ol> '''Actual result:''' <ol><li>First item</li><li>*Second item *is a nested list *of multiple items</li></ol> The module seems to cause it by removing the leading whitespace from parameters. It was broken between [https://web.archive.org/web/20140524230530/http://en.wikipedia.org/wiki/Single_Convention_on_Narcotic_Drugs#Schedule_III_.28light_subset_of_Schedules_I_and_II.29 May] and [https://web.archive.org/web/20140613132017/http://en.wikipedia.org/wiki/Single_Convention_on_Narcotic_Drugs#Schedule_III_.28light_subset_of_Schedules_I_and_II.29 June 2014]. <span style="font-family:Segoe Script">[[User:Petr Matas|Petr Matas]]</span> 17:26, 2 September 2019 (UTC) : [[User:Petr Matas|Petr Matas]], possibly due to the refactor by {{U|Mr. Stradivarius}} at around that time? I put some [//en.wikipedia.org/w/index.php?title=Module:List/sandbox&diff=prev&oldid=913719626 code in the sandbox] (taken from the documentation for [[Module:Arguments]]) which seems to fix the problem. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 20:19, 2 September 2019 (UTC) ::Add an escaped space thus: {{Ordered list |First item |  *Second item *is a nested list *of multiple items}} ::--[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] 🌹 ([[User talk:Redrose64|talk]]) 21:18, 2 September 2019 (UTC) ::: Yes, that workaround is possible. But should not we fix the bug instead? Are there any good reasons for trimming the parameters? Note that no workaround was needed before the trimming was introduced in 2014. <span style="font-family:Segoe Script">[[User:Petr Matas|Petr Matas]]</span> 21:26, 2 September 2019 (UTC) :: [[User:Frietjes|Frietjes]], thanks for showing me where to look. Cannot we just [[Special:Diff/874524067/913726310|add ''trim = false'']]? <span style="font-family:Segoe Script">[[User:Petr Matas|Petr Matas]]</span> 21:26, 2 September 2019 (UTC) :::[[User:Petr Matas|Petr Matas]] probably, since named parameters are automatically trimmed. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 21:27, 2 September 2019 (UTC) ::::On second thoughts, unlike my version, yours removes whitespace-only arguments, which is probably desired. <span style="font-family:Segoe Script">[[User:Petr Matas|Petr Matas]]</span> 23:26, 2 September 2019 (UTC) ::::I have [[Special:Diff/913719626/913750573|simplified your version]] a bit without changing its behavior. <span style="font-family:Segoe Script">[[User:Petr Matas|Petr Matas]]</span> 08:39, 3 September 2019 (UTC) ::[[Special:Diff/610143502|Diff/610143502]] by {{U|Mr. Stradivarius}} added the trimming, because it removed the valueFunc, which originally read: <nowiki> local args = getArgs(frame, { valueFunc = function (key, value) if type(key) == 'number' or value ~= '' then return value end end })</nowiki> ::I guess that he did it to remove all blank arguments, but inadvertently introduced the trimming. <span style="font-family:Segoe Script">[[User:Petr Matas|Petr Matas]]</span> 22:17, 2 September 2019 (UTC) {{edit template-protected|answered=yes}} Please apply [[Special:Diff/874524067/913750573|this change]] to fix the issue described above. It is equivalent to the change proposed by {{u|Frietjes}} above, but more concisely coded. Edit summary to be added: ''Do not trim arguments, but still remove whitespace-only arguments''. <span style="font-family:Segoe Script">[[User:Petr Matas|Petr Matas]]</span> 03:49, 8 September 2019 (UTC) :[[File:Yes check.svg|20px|link=|alt=]]ย '''Done'''<!-- Template:ETp --> [[User:DannyS712|DannyS712]] ([[User talk:DannyS712|talk]]) 04:13, 8 September 2019 (UTC) ::{{undone}}. {{to|DannyS712}} this edit broke {{tl|Hlist}}, which uses this module. Needs more testing. '''''[[User:Paine Ellsworth|<span style="font-size:95%;color:darkblue;font-family:Segoe Script">P. I. Ellsworth</span>]]''''', [[Editor|<span style="color:black">ed.</span>]] [[User talk:Paine Ellsworth|<sup>put'r there</sup>]] <small>14:31, 8 September 2019 (UTC)</small> :: This edit also caused {{tl|WikiProject status}} to render its list of shortcuts improperly, but I fixed the problem. {{tl|WikiProject status}} uses {{tl|Ombox/shortcut}}, which renders the shortcuts with {{tl|Ubl}}. After this edit, the second to fifth <code><nowiki><li></nowiki></code> elements were rendered outside of the the list's <code><nowiki><ul></nowiki></code> element, and caused a bullet point to appear in front of them. The incorrect rendering was traced to line breaks inside {{tl|Ubl}}, and the list renders correctly after [[Special:Diff/911551070/914739746|the line breaks were removed]]. <small>(I [[Special:Diff/914635756|confirmed]] this in {{tl|Ombox/shortcut/sandbox}} two minutes before {{np|Paine Ellsworth}} [[Special:Diff/914636065|reverted]] the module edit.)</small> โ '''''[[User:Newslinger|<span style="color:#536267;">Newslinger</span>]]''' <small>[[User talk:Newslinger#top|<span style="color:#708090;">talk</span>]]</small>'' 14:44, 8 September 2019 (UTC) So, it seems like we will need something more advanced. in [[Module:infobox]] we do some context-sensitive trimming where we add newlines when the entry starts with a "*" or "#" or ":" or ";" or "{|". so, we could probably adapt the more complicated version to skip trimming when the entry starts with one of these. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 16:34, 8 September 2019 (UTC) : totally untested, but something [//en.wikipedia.org/w/index.php?title=Module%3AList%2Fsandbox&type=revision&diff=914652462&oldid=874524067 like this]. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 16:41, 8 September 2019 (UTC) :Tested with {{tl|Hlist/sandbox}}, which invokes [[Module:List/sandbox]], and appears to work fine, just like {{tl|Hlist}}. '''''[[User:Paine Ellsworth|<span style="font-size:95%;color:darkblue;font-family:Segoe Script">P. I. Ellsworth</span>]]''''', [[Editor|<span style="color:black">ed.</span>]] [[User talk:Paine Ellsworth|<sup>put'r there</sup>]] <small>19:18, 11 September 2019 (UTC)</small> :Also, the other templates mentioned, {{tl|WikiProject status}} โ {{tl|Ombox/shortcut}} โ {{tl|Ubl}} โ [[:Module:List]], will render as expected. If no other objections/failed tests arise, we can try this again. '''''[[User:Paine Ellsworth|<span style="font-size:95%;color:darkblue;font-family:Segoe Script">P. I. Ellsworth</span>]]''''', [[Editor|<span style="color:black">ed.</span>]] [[User talk:Paine Ellsworth|<sup>put'r there</sup>]] <small>20:00, 11 September 2019 (UTC)</small> :: {{tl|WikiProject status/sandbox}} works properly, even after [[Special:Diff/915196368/915206793|restoring the line breaks]] in {{tl|Ombox/shortcut}}. โ '''''[[User:Newslinger|<span style="color:#536267;">Newslinger</span>]]''' <small>[[User talk:Newslinger#top|<span style="color:#708090;">talk</span>]]</small>'' 21:12, 11 September 2019 (UTC) :{{tl|Infobox person}} โ {{tl|Unbulleted list}} โ [[:Module:List]] will render normally; also {{tl|Ordered list/sandbox}} is as expected. '''''[[User:Paine Ellsworth|<span style="font-size:95%;color:darkblue;font-family:Segoe Script">P. I. Ellsworth</span>]]''''', [[Editor|<span style="color:black">ed.</span>]] [[User talk:Paine Ellsworth|<sup>put'r there</sup>]] <small>20:48, 11 September 2019 (UTC)</small> :{{done}}. {{to|Petr Matas|Frietjes|Redrose64|DannyS712|Newslinger}} fingers crossed. '''''[[User:Paine Ellsworth|<span style="font-size:95%;color:darkblue;font-family:Segoe Script">P. I. Ellsworth</span>]]''''', [[Editor|<span style="color:black">ed.</span>]] [[User talk:Paine Ellsworth|<sup>put'r there</sup>]] <small>21:16, 11 September 2019 (UTC)</small> :I have added corresponding [[Module:List/testcases|testcases]]. <span style="font-family:Segoe Script">[[User:Petr Matas|Petr Matas]]</span> 07:28, 12 September 2019 (UTC) :...and handling of "{|". See [[Special:Diff/915276871|my edit]]. {{to|Frietjes}} Is there any reason for not using mw.text.trim()? <span style="font-family:Segoe Script">[[User:Petr Matas|Petr Matas]]</span> 07:58, 12 September 2019 (UTC) == Reverse ordered lists? == Is it possible to use this module (or another module/template) to create reverse ordered lists, i.e. using the [https://www.w3schools.com/tags/att_ol_reversed.asp <code>reversed</code> attribute]? – [[User:Joe Roe|Joe]] <small>([[User talk:Joe Roe|talk]])</small> 12:01, 15 April 2020 (UTC) == Feature req.: inline-block version for horizontal lists == Both {{tlx|Hlist}} and {{tlx|Flatlist}} could really use a version that worked inline, instead of forcing a new block. I believe that this would work with <code>display: inline-block;</code> on the surrounding list element as well as the list items. This could be triggered by an {{para|inline|y}} (or other positive-value) template parameter. Here's a raw-HTML test: {{block indent|1= Intro text: <ul style="display: inline-block;"> <li style="display: inline-block;">1st item</li> <li style="display: inline-block;">2nd item</li> <li style="display: inline-block;">3rd item</li> </ul>. Outro text. }} The test needs CSS styling for spacing and to provide separators with <code>:before</code>, but it proves that the method works. I'm a chicken, ''bawk-bawk'', when it comes to modifying Lua modules that are in heavy use, so I'll punt the brunt unto the Scribunto junta.<br /><span style="white-space:nowrap;font-family:'Trebuchet MS'">โโโฏ[[User:SMcCandlish|'''SMcCandlish''']] [[User talk:SMcCandlish|โ]] [[Special:Contributions/SMcCandlish|ยข]]โ๐ผโ</span> 10:46, 4 April 2021 (UTC) : This already works for {{tl|hlist}}: {{tlx|hlist|style{{=}}display:inline|list_style{{=}}display:inline-block|1st item|2nd item|3rd item}} procudes <br/> Intro text: {{hlist|style=display:inline|list_style=display:inline-block|1st item|2nd item|3rd item}} Outro text <br/> I do agree that it may be a good idea to add a {{para|inline}} parameter to do that. {{tl|flatlist}}, confusingly, is a pure-wikitext template and is not implemented using this module. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 16:02, 4 April 2021 (UTC) == Inlining styles via TemplateStyles. Who can help? == Moving this convo to [[MediaWiki talk:Common.css]] for other feedback, since this module page seems to be out of way for other watchers. --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 22:54, 3 October 2021 (UTC) == Alternate bullet symbols == Please join [[Template talk:Bulleted list#Style problem]], which may also relate to the [[#bulleted list]] topic above from a few years ago. [[User:DMacks|DMacks]] ([[User talk:DMacks|talk]]) 06:41, 24 November 2023 (UTC) :{{ping|GreenC|Redrose64}} you were part of that old discussion. [[User:DMacks|DMacks]] ([[User talk:DMacks|talk]]) 06:42, 24 November 2023 (UTC) == Nested wikitext list runs on == I try to use a wikitext list in Module:List's items. Unexpected, the nested list never ends, running on to contaminate other entries of the Module's list. {|class=wikitable !Code !! Expected !! Actual (from subst) |- |<pre>{{#invoke:list|ordered |1=a |2=b * ba * bb |3=c }} </pre> | #a #b #*ba #*bb #c | <div><ol><li>a</li><li>b * ba * bb</li><li>c</li></ol></div> |} It looks like wikitext() never got to adding a <code></ul></code> for the nested list. Tidy somehow then decides, from whatever we are feeding it, that the correct topology is to let the internal list run on. I tried adding item:done() to the sandbox version, thinking it might insert a <code></li></code> to help close the list. Doesn't seem to help, at least according to comment-preview. [[User:Artoria2e5|Artoria]][[User talk:Artoria2e5|2e5]] <small style="font-weight:lighter">[[Special:Contributions/Artoria2e5|๐]]</small> 03:09, 8 January 2024 (UTC) [[Special:ExpandTemplates]] gives some new insight: allegedly the invocation it first turns into <pre> <div><ol><li>a</li><li>b * ba * bb</li><li>c</li></ol></div> </pre> This is a little bit of a pitfall on the Scribunto side, since mw.html:wikitext() obviously doesn't really so much build HTML then just insert raw wikitext into its output. I added an explicit newline to break the list on the sandbox and it seems to help: {{#invoke:list/sandbox|ordered |1=a |2=b * ba * bb |3=c }} (There's one remaining mystery here: the thing somehow works with [[Template:Ordered list/testcases]]. What's trimming doing?) --[[User:Artoria2e5|Artoria]][[User talk:Artoria2e5|2e5]] <small style="font-weight:lighter">[[Special:Contributions/Artoria2e5|๐]]</small> 03:21, 8 January 2024 (UTC) :Solved my mystery: proceeding text is required to trigger problem. Also, thanks to peppery for fixing my fat finger mistake. [[User:Artoria2e5|Artoria]][[User talk:Artoria2e5|2e5]] <small style="font-weight:lighter">[[Special:Contributions/Artoria2e5|๐]]</small> 06:53, 8 January 2024 (UTC) === Protected edit request on 8 January 2024 === {{edit fully-protected|Module:List|answered=yes}} Per above, I intentionally added a newline after the end of each li node to prevent running-on of wikitext lists. Although doing so appear to break [[Module_talk:List/testcases|3 Lua tests]], they should have zero actual effect on the final HTML output after Tidy. I would even go so far to argue that the tests are wrong. Please apply my last revision at [[Module:List/sandbox]] (1194269755 right now) to the main version. [[User:Artoria2e5|Artoria]][[User talk:Artoria2e5|2e5]] <small style="font-weight:lighter">[[Special:Contributions/Artoria2e5|๐]]</small> 03:21, 8 January 2024 (UTC) : {{done}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 16:55, 8 January 2024 (UTC) ::{{re|Artoria2e5|Pppery}} FYI I think this edit affected the appearance of lists like the ones at [[Wikipedia:Administrators' newsletter/2023/12]] (and every other admin newsletter). I'm not technically proficient enough to come up with an explanation or resolution though, so just wanted to point it out. [[User:DanCherek|DanCherek]] ([[User talk:DanCherek|talk]]) 18:17, 8 January 2024 (UTC) ::: Yeah, that looks bad. {{reverted}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 18:18, 8 January 2024 (UTC) :::Interesting. Iโm a little late here, but I think I can try and reproduce with hlist/sandbox when I get upโฆ [[User:Artoria2e5|Artoria]][[User talk:Artoria2e5|2e5]] <small style="font-weight:lighter">[[Special:Contributions/Artoria2e5|๐]]</small> 01:43, 9 January 2024 (UTC) ::::If people are experimenting with this further, please check {{tl|Politics of Turkey}}, one of many sidebar templates that appears to have been negatively affected by the above change. It's fine after the revert, but it had a Linter syntax error that you could see on the Page information page, and maybe some bad rendering. โ [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 01:52, 9 January 2024 (UTC) === Debug session === Alright, let's see what went wrong. Here are the extracted testcases: {{Test case nowiki|collapsible=yes|showcode=yes|format=tablerows|class=wikitable|template=hlist|title=Admin newsletter case|<nowiki>[[File:Wikipedia Administrator.svg|20px|alt=]] '''Administrator changes''' :[[File:Gnome-colors-list-add.svg|20px|alt=added|Added]] {{__TEMPLATENAME__|class=inline |[[Wikipedia:Requests for adminship/Ganesha811|Ganesha811]] |[[Wikipedia:Requests_for_adminship/JPxG|JPxG]] }}</nowiki>}} {{Test case nowiki|collapsible=yes|showcode=yes|format=tablerows|class=wikitable|template=hlist|title=Turkiye sidebar case| <nowiki> * Recent elections *: [[Parliamentary elections in Turkey|Parliamentary]] *:: {{__TEMPLATENAME__ |[[November 2015 Turkish general election|2015]] |[[2018 Turkish parliamentary election|2018]] |[[2023 Turkish parliamentary election|2023]]}} *: [[Turkish presidential elections|Presidential]] </nowiki> }} The common theme here is that a list not supposed to be broken is broken, which is kinda an obvious consequence of the newline. How do we make sure the list breaks when we want it to, and also doesn't when we don't want it to? I'm going to first try newline before </li>. If that doesn't work, we might have to explicitly signal when to add a newline, or ask users to insert some invisble but untrimmable thing after the list (like a <nowiki/>). --[[User:Artoria2e5|Artoria]][[User talk:Artoria2e5|2e5]] <small style="font-weight:lighter">[[Special:Contributions/Artoria2e5|๐]]</small> 06:20, 9 January 2024 (UTC) Nope, this does not work. I think an explicit newline argument is overkill; let's just change the doc to mention the <nowiki/> technique (why didn't I think of it earlier?). {{Test case nowiki|collapsible=yes|showcode=yes|format=tablerows|class=wikitable|template=#invoke:list|title=Run-on avoidance|<nowiki>{{__TEMPLATENAME__|ordered|1=a |2=b * ba * bb <nowiki/> |3=c}}</nowiki>}} Yep, that works. --[[User:Artoria2e5|Artoria]][[User talk:Artoria2e5|2e5]] <small style="font-weight:lighter">[[Special:Contributions/Artoria2e5|๐]]</small> 06:25, 9 January 2024 (UTC) :My brain is a little stuck. I am having trouble thinking of where to put that workaround advice. Maybe later. [[User:Artoria2e5|Artoria]][[User talk:Artoria2e5|2e5]] <small style="font-weight:lighter">[[Special:Contributions/Artoria2e5|๐]]</small> 06:41, 9 January 2024 (UTC) {{outdent}} {{tl|Bulleted list}} says it is for situations "{{tq|where the equivalent wiki markup (asterisks at the starts of new lines) may be awkward or impossible to use.}}" {{markup |<syntaxhighlight lang="wikitext">{{#invoke:list|ordered|1=a |2=b{{bulleted list |ba |bb }} |3=c }}</syntaxhighlight> |{{#invoke:list|ordered|1=a |2=b{{bulleted list |ba |bb }} |3=c }} }} Regards, [[User:Rjjiii|<span style="font-variant:small-caps;">Rjj<sup>iii</sup></span>]] ([[User talk:Rjjiii#top|talk]]) 06:51, 9 January 2024 (UTC) == Protected edit request on 15 March 2024 == {{edit fully-protected|Module:List|answered=yes}} Sync with [[Special:Diff/1213864199]], which adds the following after line 186: <syntaxhighlight lang="lua> frameOnly = ((frame.args.frameonly or '') ~= ''),</syntaxhighlight> This will add a {{para|frameonly}} parameter, which allows the module to be called directly from a template (for reduced [[WP:PEIS|post-expand include size]]) without the module getting confused by parameters passed to the calling template. --[[User:Ahecht|Ahecht]] ([[User talk:Ahecht|<span style="color:#FFF;background:#04A;display:inline-block;padding:1px;vertical-align:-.3em;font:bold 50%/1 sans-serif;text-align:center">TALK<br />PAGE</span>]]) 15:55, 15 March 2024 (UTC) : {{Done}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 20:44, 25 March 2024 (UTC) :: Note this was later reverted because it broke things. I've coded what I believe is a fixed version in the sandbox, but I will let a different admin deploy this time, so reactivating the request. Cc {{u|Ahecht}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 20:55, 25 March 2024 (UTC) :::Good catch. I don't think that that error would occur in the real world except in a corner case where a module artificially created a new frame and set the arguments equal to nil, but it's better safe than sorry. --[[User:Ahecht|Ahecht]] ([[User talk:Ahecht|<span style="color:#FFF;background:#04A;display:inline-block;padding:1px;vertical-align:-.3em;font:bold 50%/1 sans-serif;text-align:center">TALK<br />PAGE</span>]]) 00:20, 26 March 2024 (UTC) ::::Sandbox code looks fine to me. But using the "wrappers" option in [[Module:Arguments]] has always worked well for me in the past. In their a reason this approach can't be used to automatically switch between frame and parent frame parameters? — Martin <small>([[User:MSGJ|MSGJ]] ยท [[User talk:MSGJ|talk]])</small> 15:19, 28 March 2024 (UTC) ::::: The problems is that there are pages dependent on mixing behavior like {{Tl|Unbulleted list citebundle}}. This is one of the highest-use templates on the project so has [[Hyrum's law]]-ed beyond all recognition and we should avoid what could even be seen as a breaking change. Ahecht and I both learned that lesson the hard way, and we don't want to repeat it. [[User:Pppery (alt)|Pppery (alt)]] ([[User talk:Pppery (alt)|talk]]) 19:26, 28 March 2024 (UTC) {{od}} Apparently I'm the only admin willing to touch this with a ten-foot pole. {{done}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 16:46, 19 May 2024 (UTC)
Summary:
Please note that all contributions to The Republic Wiki are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) (see
The Republic Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:!!
(
edit
)
Template:!-
(
edit
)
Template:Bigger
(
edit
)
Template:Block indent
(
edit
)
Template:Braces
(
edit
)
Template:Bulleted list
(
edit
)
Template:Copied
(
edit
)
Template:Done
(
edit
)
Template:Edit fully-protected
(
edit
)
Template:Edit template-protected
(
edit
)
Template:For loop
(
edit
)
Template:Format item
(
edit
)
Template:Hlist
(
edit
)
Template:Hlist/styles.css
(
edit
)
Template:Item
(
edit
)
Template:Markup
(
edit
)
Template:Markup/row
(
edit
)
Template:Markup/styles.css
(
edit
)
Template:Np
(
edit
)
Template:Od
(
edit
)
Template:Oldtfdfull
(
edit
)
Template:Ordered list
(
edit
)
Template:Outdent
(
edit
)
Template:Para
(
edit
)
Template:Ping
(
edit
)
Template:Re
(
edit
)
Template:Reverted
(
edit
)
Template:Tag
(
edit
)
Template:Template link
(
edit
)
Template:Template link expanded
(
edit
)
Template:Test case nowiki
(
edit
)
Template:Tl
(
edit
)
Template:Tlbare
(
edit
)
Template:Tlx
(
edit
)
Template:To
(
edit
)
Template:Tq
(
edit
)
Template:U
(
edit
)
Template:Undone
(
edit
)
Template:WikiProject banner shell
(
edit
)
Template:โข
(
edit
)
Module:Arguments
(
edit
)
Module:For loop
(
edit
)
Module:Item
(
edit
)
Module:List
(
edit
)
Module:List/sandbox
(
edit
)
Module:TableTools
(
edit
)
Module:Template link general
(
edit
)
Module:Yesno
(
edit
)
Return to "List" page.