Module talk:Labelled list hatnote

Proposal to add nowrap capabability
A proposal to add nowrap capability is given initially for Further. There is a working template space mockup at Template:Further/sandbox, and a demo of it on the Talk page. Please see discussion at Template:Further. Courtesy ping: User:Nihiltres. Thanks, Mathglot (talk) 06:06, 21 March 2022 (UTC)

Boolean problem
Recent edits changed selfref to a boolean. That has given a problem demonstrated at God the Father:
 * Lua error in Module:Hatnote at line 146: bad argument #1 to 'addClass' (string, number or nil expected, got boolean).

That is because line 146 of Module:Hatnote is

so if selfref is false, that is what is passed to addClass. Presumably it was nil before and addClass ignored that? Johnuniq (talk) 23:40, 5 June 2022 (UTC)


 * Yes, that was a fragile conditional in Module:Hatnote; I fixed it immediately in this edit. {&#123; Nihiltres &#8202;&#124;talk&#8202;&#124;edits}&#125; 04:19, 6 June 2022 (UTC)

Template-protected edit request on November 8, 2023
This module seems to be causing a comma to unnecessarily appear in lists consisting of two items when the first item is a section link. For example:

compared to

I would provide a more detailed fix in this request if I knew what I was going with Lua, but I think I'll defer that part to someone more experienced at it than me. Thanks! —TechnoSquirrel69 (sigh) 08:01, 8 November 2023 (UTC)


 * I think this adjustment is on line number 68 of Module:Hatnote list (one of this module's dependencies). The comment on line number 65 suggests this.
 * Nishimoto, Gilberto Kiyoshi (talk) 12:30, 8 November 2023 (UTC)
 * That looks like a deliberate programming choice. Also, the documentation for that module says that it is used in over 1 million pages, so any changes would need to be tested thoroughly. – Jonesey95 (talk) 01:06, 9 November 2023 (UTC)
 * Since it seems now seems to be intentional, does anyone know of any particular reason why the comma is programmed to appear after a section link? It's not immediately obvious to me what the point of that is. —TechnoSquirrel69 (sigh) 01:12, 9 November 2023 (UTC)
 * accessibility, maybe... Nishimoto, Gilberto Kiyoshi (talk) 01:37, 9 November 2023 (UTC)
 * I just tried to indicate, to the editor of the previous message, the point where I think the issue he raised lies. Although grammar rules vary between languages, this comma helps me discern where 2 (page and section) are 1 (link). So I'm not opposing it. I'm training in editing, to adapt enwiki modules to ptwiki, and I'm really enjoying the 'self-taught' learning. The English language is not my native language, I depend on web translators to understand and communicate with you, so forgive me if I make some mistakes (such mistakes are not intentional). Grateful for the attention. Nishimoto, Gilberto Kiyoshi (talk) 01:31, 9 November 2023 (UTC)
 * * Pppery * it has begun... 18:20, 10 November 2023 (UTC)
 * Red information icon with gradient background.svg Not done: the relevant code is not in this module but in Module:Hatnote list, and it is very intentional, so we should probably establish a proper consensus, on the proper talk page, before changing it, not least because Module:Hatnote list is transcluded to a very large number of pages. For context, the idea was originally suggested by as "easier to read" at Template talk:See also § Oxford Comma? and then echoed by  at Wikipedia talk:Hatnote § Standardizing for-see lists (since archived), where I (who was doing the mentioned standardization) saw it, thought it was a nice idea, and implemented it. I wouldn't terribly mind changing this behaviour, but I am going to ask for a consensus first. {&#123; Nihiltres &#8202;&#124;talk&#8202;&#124;edits}&#125; 00:09, 11 November 2023 (UTC)
 * If we're going to discuss this here, then: I would be opposed dropping the comma. It helps distinguish the two referents when one or both of them is complicated by the presence of a § segment; it is similar to use of a semicolon instead of a comma between clauses when at least one of them contains its own comma(s). The "Further information: Example1 § Example2 and Example3" format the OP wants would be difficult to parse correctly for many readers, especially those with visual impairments like colorblindess marking it harder to discern which part is a link and which is not. It looks like it means "sections Example2 and Example3 of page Example1". This is less of an issue when page names start with something like "Wikipedia:", but it is a clear problem when dealing with articles and their section names.  — SMcCandlish ☏ ¢ 😼  00:26, 11 November 2023 (UTC)
 * I will note that it's pretty standard to use two section symbols when referring to multiple sections of the same document; in other words, there's a meaningful difference between Example § Example and Example and Example §§ Example and Example. I don't think this double section symbol format is used anywhere on Wikipedia, but I don't personally see an ambiguity being introduced if the comma was removed, even without the link colors. —TechnoSquirrel69 (sigh) 01:33, 11 November 2023 (UTC)
 * Also, this feels like the kind of thing that should be covered somewhere in like a 500-page style guide. I have no idea where to start looking for such a research, though. —TechnoSquirrel69 (sigh) 01:38, 11 November 2023 (UTC)
 * Right and fair.
 * I was thinking about making an alternative version, which follows the grammar rule contextualized here, in a ptwiki testing area. I think commenting on lines 72 and 73 there, which are equivalent to lines 67 and 68 here, would be enough. The main module editor resolved the issue by removing  on the line there which is equivalent to line 67 here (the question, on ptwiki, was related to 3 or more items in a list and the conjunction with or without separator/comma).
 * But after reading, quickly and superficially, the section "Ambiguity" of the article Serial comma (and its respective version in Portuguese), it seems to me that we have good reasons for the choices we made. Until last week, I still thought that its usage was not in line with grammar rules. I'm glad to know that the serial comma is no longer 'illegal'. I would try such a modification, just to test whether my current understanding (when it comes to code editing) is consistent.
 * Thanks again for the classes. Nishimoto, Gilberto Kiyoshi (talk) 21:47, 11 November 2023 (UTC)