Jump to content

Template talk:Infobox

From The Brosketeers Chronicles
Revision as of 21:59, 15 July 2026 by imported>Anomie (Edit request 10 July 2026: Reply)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Permanently protected Template:Talkheader Template:WikiProject banner shell User:MiszaBot/config

Auto implement Template:longitem

I have recently been adding {{longitem}} to numerous Infoboxes (example) to better wrap long items in labels. It has occurred to me, shouldn't this be automatic? Is there any situation where you would not want better wrap labels that take up 2 lines? It would seem to me that it would be a much better solution to automatically do this at the level of {{Infobox}}/Module:Infobox rather then having to individually wrap any infobox label that has the potential to wrap to a second line.

If there is an objection to automatically implementing this on every infobox, could we implement it but hide it behind a flag like <syntaxhighlight lang="wikitext" inline style="display: none;" />|auto_longitem= (to mimic the way <syntaxhighlight lang="wikitext" inline style="display: none;" />|autoheaders= is used)?

Boils down to 2 questions:

  1. Is there any objection to adding such a feature?
  2. How technically feasible is it to achieve?

Pinging users who have done major work on this module: Template:Ping Zackmann (Talk to me/What I been doing) 17:50, 9 May 2026 (UTC)

I don't see a need for something needed so irregularly in a generic template. Izno (talk) 18:47, 9 May 2026 (UTC)
Template:Ping can you say more? Template:Tq? It seems to be used quite a lot so not sure I understand your meaning? Zackmann (Talk to me/What I been doing) 18:58, 9 May 2026 (UTC)
You've added it to a dozen templates in the past month and a half but only to a handful of parameters each. It doesn't need to be supported at that level of use. Izno (talk) 19:03, 9 May 2026 (UTC)
I guess my point is rather than having to add it one by one, wouldn't it be easier to just have it automatically implemented? I'm genuinely asking as I don't have enough of an understanding of the Module to know, is there a downside to automatically wrapping long labels with less padding that would make this a bad idea to do? I agree I've only added it to a few templates recently, but wouldn't it be better to not have to search for these cases and manually add it and instead have it automatically done. What am I missing? Zackmann (Talk to me/What I been doing) 21:06, 9 May 2026 (UTC)
So I was able to pretty quickly and easily achieve this with this edit to Module:Infobox/styles.css. Please someone let me know (or simply revert it) if there is any issue with this that I am overlooking. Zackmann (Talk to me/What I been doing) 23:06, 9 May 2026 (UTC)
Ugh so it caused an issue with Template:Infobox soap character. Open to ideas... Zackmann (Talk to me/What I been doing) 02:25, 10 May 2026 (UTC)
@Zackmann08 Never ever make test edits to a module so widely transcluded. Please don't do that again. Izno (talk) 15:53, 10 May 2026 (UTC)
To be fair, I tested the edits repeatedly... My edit summary doesn't accurately portray that and I will be sure to better summarize in the future. This was quite extensively tested. An unforeseen very minor issue cropped up and I immediately reverted my edit, but this was a minor style issue. It is not like I blanked data or broke templates. Your warning is noted, but I feel overly dramatic. Zackmann (Talk to me/What I been doing) 15:56, 10 May 2026 (UTC)
I could have told you, if that was what you intended to implement, that it would cause issues. It is not a minor issue. I could have told you that your change would break how the template works if you had proposed the actual change on the talk page using a sandbox (and would probably also affect mobile poorly, based on the specific change). Do better.
An immediate revert is insufficient; you're still dropping 3 million pages into the job queue. Izno (talk) 16:00, 10 May 2026 (UTC)
Making that change is also incompatible with where the template will eventually go (see User:Izno/Sandbox/Infobox).
If you want to handle long items, you will need to continue implementing them ad hoc. Izno (talk) 16:01, 10 May 2026 (UTC)
Template:Ping that is duly noted. I felt I tried to solicit your input and you were pretty dismissive of the idea as a whole. In the future I will be more careful and I do apologize. I admit I completely neglected to realize that I was Template:Tq. Clearly I still have lots to learn. Rest assured I hear you loud and clear and I will do better moving forward. I had planned to continue with this idea at Module:Infobox/styles.css/sandbox and to request a review and leave it to someone else to actually implement in the live version of the code. Based on the wholly negative reaction I guess it is best to just walk away and focus on other projects. Zackmann (Talk to me/What I been doing) 16:06, 10 May 2026 (UTC)
Thanks for the ping, but this is beyond my skill set. I merely updated some category names. – Fayenatic London 14:34, 10 May 2026 (UTC)

Dark Mode

I'm confused. Why exactly is Infobox styling completely hidden in dark mode while other CSS isn't? --DollarStoreBa'alConverse 22:44, 9 May 2026 (UTC)

Blank rows on child infoboxes....

There was previously a discussion here about blank rows on child infoboxes. Looks like the thread went stale and was never addressed. To recap and restate what Template:U said in the initial post which arose because of an issue with {{Infobox social media personality}}

Template:Tqb

I am seeing this in many, many places and wondering if someone with more experience that I can help trace this down. --Zackmann (Talk to me/What I been doing) 23:23, 1 June 2026 (UTC)

I have added a very simplistic testcase here to show the issue. Zackmann (Talk to me/What I been doing) 23:38, 1 June 2026 (UTC)
Template:Ping is this something you can provide any guidance on? I'm certainly not going to push any changes live without a review but after my experience above I'm a bit wary here... Zackmann (Talk to me/What I been doing) 03:55, 2 June 2026 (UTC)
Template:Ping any ideas here? Even a nudge in the right direction would be appreciated... Spent some time playing with it but got nowhere. Zackmann (Talk to me/What I been doing) 23:31, 2 June 2026 (UTC)
Special:Diff/1327161879/1357499550, maybe? Anomie 00:25, 3 June 2026 (UTC)
And the gold star goes to Anomie!!! That definitely seems to solve the issue I was seeing. Template:Ping can you confirm? Zackmann (Talk to me/What I been doing) 00:28, 3 June 2026 (UTC)
I just tried some local tests and it worked on all of the nesting combinations I could think of. Amazing work, Template:Ping thanks! This has been bugging me for so long. Prefall 01:34, 3 June 2026 (UTC)
Having scrolled through the Infobox/testcases, I am not seeing any issues that this has caused. Template:Ping are you comfortable merging? Zackmann (Talk to me/What I been doing) 05:04, 3 June 2026 (UTC)
This should be merged as a templatestyles adjustment with a class. Izno (talk) 06:49, 3 June 2026 (UTC)
It seems Izno has ideas for doing it differently, so I'll hold off pending that proposal. Anomie 11:29, 3 June 2026 (UTC)
Template:Ping can you clarify what the issue is with the way Template:U has solved this long standing issue or implement your proposed solution? Zackmann (Talk to me/What I been doing) 17:54, 3 June 2026 (UTC)
It's just a minor change [1], with the appropriate add in the styles sheet.
Beginning to wonder whether the right approach should be to move TemplateStyles totally outside the infobox instead of the shiftery that goes on at Module:Infobox#L-61. See e.g. hiding_templatestyles in Module:Navbox for something similar.
As I said earlier this should be a non-issue at some point in the future, right now it's all happening because we're hacking around the infobox being a table. Izno (talk) 20:46, 3 June 2026 (UTC)
Awesome thanks for making this happen. Hopefully this does become a non-issue in the future! Zackmann (Talk to me/What I been doing) 20:59, 3 June 2026 (UTC)
Template:Ping is it safe to add the appropriate code to Module:Infobox/styles.css or should I create Module:Infobox/styles.css/sandbox to properly test this? Zackmann (Talk to me/What I been doing) 05:27, 7 June 2026 (UTC)
Module:Infobox/sandbox/styles.css is where it would exist if you wanted to check it for yourself. I just assumed that Anomie would revisit. :^) Izno (talk) 05:42, 7 June 2026 (UTC)
I wasn't sure where the sandbox went in that title. Thank you. Template:Ping do you want to implement this new solution or shall I? Zackmann (Talk to me/What I been doing) 16:15, 7 June 2026 (UTC)
You can go for it if you want. I'm a bit busy at the moment. Anomie 17:25, 7 June 2026 (UTC)
After testing, this solution appears to be working. Template:Ping can you you please review Module:Infobox/sandbox/styles.css and Module:Infobox/sandbox and confirm you aren't seeing something I'm missing? Having checked all the test cases, I see nothing broken and the identified issue resolved. Zackmann (Talk to me/What I been doing) 18:15, 7 June 2026 (UTC)
If you want to, go for it. Just make sure to target the right styles page from the main module when you copy it over. Izno (talk) 22:28, 7 June 2026 (UTC)
Template:Done Good reminder! Thank you. Zackmann (Talk to me/What I been doing) 01:00, 8 June 2026 (UTC)
Template:Ping I noticed this fix has now been deployed across infoboxes, and it's working on desktop view, but not on mobile view. I specifically tested mobile view when I left my previous comment, and it was working then. The class with "display: none" seems to be getting overwritten on mobile by another CSS rule with "display: flex". Not sure if this is the best way to solve this, but adding "!important" to the hidden class worked for me locally. Prefall 20:11, 9 June 2026 (UTC)
Rather than !important, it might make more sense to add a selector for body.skin--responsive.skin-minerva .infobox > tbody > tr.infobox-hiddenrow to override the problematic rule from the Minerva skin. Anomie 21:40, 9 June 2026 (UTC)
Knowing very little about the different skins or the differences in views between mobile and desktop, I'm going to abstain here... Happy to help if I can but this is a bit over my head. Zackmann (Talk to me/What I been doing) 21:42, 9 June 2026 (UTC)
Yeah, sorted. I am annoyed by the upstream specificity. Izno (talk) 21:51, 9 June 2026 (UTC)

Template:Infobox historic site Template:Ping and all, I'm also still seeing an issue here on desktop actually... Found on Jere Shine site by reproduced at right. Hust about the call to {{Infobox NRHP}} there is still an extra row being shown. --Zackmann (Talk to me/What I been doing) 00:49, 10 June 2026 (UTC)

Looks like {{Infobox NRHP}} doesn't have anything to do with it; instead, it's a use of {{Infobox designation list}} internal to {{Infobox historic site}} where no designations are provided so it produces a stylesheet but zero rows; the fix above assumed there would always be at least one row. The fix I'd recommend here is different: there are already checks in various places like <syntaxhighlight lang=lua inline>if rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ):match('^%S') then</syntaxhighlight> that are detecting when the data is empty except for categories; those checks should probably be extended to also exclude TemplateStyles stylesheets. Anomie 12:24, 10 June 2026 (UTC)
Same discussion is happening at #Template:Infobox biathlete produces an unwanted header even when there isn't any data shown — Martin (MSGJ · talk) 12:53, 7 July 2026 (UTC)
Give Special:Diff/1363083377 a try. Anomie 23:07, 7 July 2026 (UTC)

Athlete infoboxes and personal lives

So this topic obviously is ultimately connected to the absolute overabundance of news over Kelce and Swift (groan), but I've actually found it odd for a while that athlete infoboxes never seem to cover personal lives. Marriages, children, etc. Seems like every other type of infobox for a person, be it celebrity or politician or serial killer, has a section in their infobox for notable family members of some kind. So why not athletes? Schiffy (Speak to me|What I've done) 13:37, 3 July 2026 (UTC)

This page is more about the function of the template and not so much why certain templates are the way they are. You can try asking on one of the sports person infoboxes, on WT:SPORTS, or on WT:WikiProject Templates. Izno (talk) 16:42, 3 July 2026 (UTC)
Template:Replyto See also my reply at Wikipedia talk:WikiProject Musicians#Why do modern musician articles so rarely feature a personal life section? --Redrose64 🌹 (talk) 13:12, 4 July 2026 (UTC)
Sure but in this case, for both the athlete and the musician, we're not exactly hurting for a source. And, although this seems like an anti-Wikipedian sentiment on its surface, I feel like there's some things where the source really is just "public knowledge", such as a marriage existing. If one or both people openly acknowledge that they are married, I feel that should be good enough (unless those people are known for lying). Schiffy (Speak to me|What I've done) 16:22, 4 July 2026 (UTC)

Template:Infobox biathlete produces an unwanted header even when there isn't any data shown

Template:Infobox biathlete produces an unwanted header even when there isn't any data shown. I'm not sure what is triggering this or how to fix this.

Template:Infobox biathlete wraps Template:Infobox sportsperson. The issue is in the "Sports" section (from header33 to data55 (<syntaxhighlight lang="wikitext" inline style="display: none;" />|module2=)). Template:Infobox biathlete's entire data is via <syntaxhighlight lang="wikitext" inline style="display: none;" />|module2=.

Example of the issue: Template:Infobox biathlete <syntaxhighlight lang="wikitext"> Template:Infobox biathlete </syntaxhighlight> Gonnym (talk) 19:18, 3 July 2026 (UTC)

This is a weird one... My guess is that this is related to this change that Template:U made to {{Infobox sportsperson}} regarding the use of <syntaxhighlight lang="wikitext" inline style="display: none;" />|autoheaders=yes. I did some testing and in the above example, <syntaxhighlight lang="wikitext" inline style="display: none;" />|module2= definitely should be null so I see no reason that this should be happening... It may be that due Infobox sportsperson being a wrapper, info doesn't percolate correctly?
Template:Ping You seem to really understand Module:Template wrapper, having written most of it... Can you perhaps spot an issue here or shed any light on where the problem may lay? Zackmann (Talk to me/What I been doing) 20:09, 3 July 2026 (UTC)
Doesn't the table caption arise from this snippet in {{infobox sportsperson}}?
<syntaxhighlight lang="wikitext" inline="1">|title=...
Infobox
...</syntaxhighlight>
That being true, this has nothing to do with Module:Template wrapper.
Trappist the monk (talk) 21:27, 3 July 2026 (UTC)
Template:Ping I think you are missing the issue here... The problem is not the title. It is the presence of the header saying "Sport" which should not be appearing... Zackmann (Talk to me/What I been doing) 21:31, 3 July 2026 (UTC)
Right. Same sort of issue that has nothing to do with Module:Template wrapper. In {{infobox sportsperson}} this:
<syntaxhighlight lang="wikitext" inline="1">| header33 = Sport</syntaxhighlight>
Template:Tld is the wrapped template so neither of <syntaxhighlight lang="wikitext" inline style="display: none;" />|child= and <syntaxhighlight lang="wikitext" inline style="display: none;" />|embed= are set to yes; <syntaxhighlight lang="wikitext" inline style="display: none;" />|career_header= is not set so <syntaxhighlight lang="wikitext" inline style="display: none;" />|header33= gets Sport.
Trappist the monk (talk) 22:06, 3 July 2026 (UTC)
Template:Ping sorry but you still aren't following. The problem is that in {{Infobox sportsperson}} autoheaders is turned on. Despite there seemingly being nothing passed to <syntaxhighlight lang="wikitext" inline style="display: none;" />|module2= by {{Infobox biathlete}}, {{Infobox sportsperson}} is seeing that value as not null and therefore triggering the autoheader to turn on. It doesn't matter what the value for <syntaxhighlight lang="wikitext" inline style="display: none;" />|header33= is in sportsperson, it should not be displaying at all in the example that Template:U supplied at the start of this thread. I want to be clear, I'm not suggesting there is a problem with the Template wrapper module... I'm just trying to figure out WHERE the problem lies and why it isn't working at the moment. Zackmann (Talk to me/What I been doing) 22:12, 3 July 2026 (UTC)
Copy the entire value assigned to <syntaxhighlight lang="wikitext" inline style="display: none;" />|module2= in {{Infobox biathlete}} (Template:Tld). Paste that into Special:ExpandTemplates. Click ok. Note the result.
Trappist the monk (talk) 22:47, 3 July 2026 (UTC)
Much appreciated Trappist!
Template:Ping it looks like <syntaxhighlight lang="text" class="" style="" inline="1"><templatestyles src="Module:Infobox/styles.css"></templatestyles></syntaxhighlight> is being supplied to <syntaxhighlight lang="wikitext" inline style="display: none;" />|module2=... So somewhere we have to perform the full check. Either in {{Infobox sportsperson}} or in {{Infobox biathlete}}...
OR we need to somehow modify {{Infobox}} to not generate the template styles for an empty Infobox. Either one would work me thinks. Zackmann (Talk to me/What I been doing) 23:06, 3 July 2026 (UTC)
The module should strip out templatestyles if that is the only thing that is passed when it checks for emptyness. Gonnym (talk) 07:27, 4 July 2026 (UTC)
Ok, looking at the code in debug it seems that at Module:Infobox#L-379 the data's value is '"`UNIQ--templatestyles-00000000-QINU`"' and does not pass the if check. Gonnym (talk) 07:41, 4 July 2026 (UTC)
@Izno can the module be modified to ignore rows if this is the only data in it? Gonnym (talk) 09:41, 6 July 2026 (UTC)

Edit request 10 July 2026

Template:Edit template-protected

Description of suggested change: Modify Module:Infobox to remove force as an accepted argument for <syntaxhighlight lang="wikitext" inline style="display: none;" />|italic title=, as it lacks a unique functionality and is a holdover from before {{Infobox}} and {{Italic title}} switched from wikitext to Lua implementations. Past page revisions (here and here) show that it had a functional purpose back then that wasn't preserved during the transition. Allowing force to remain an option when it no longer has any purpose is unnecessary and confusing to people unfamiliar with Lua; nowadays, regex searches (here and here) show that <syntaxhighlight lang="wikitext" inline style="display: none;" />|italic title=force is completely unused, meaning that this change won't affect any pages.

Diff: Template:Text diff IdiosyncraticLawyer (talk) 14:53, 10 July 2026 (UTC)

This seems fine as that option is not mentioned anywhere in the documentation — Martin (MSGJ · talk) 11:23, 15 July 2026 (UTC)
Please perform the edit, then. IdiosyncraticLawyer (talk) 12:19, 15 July 2026 (UTC)
Template:Not done for now: I don't want to dump 3.4 million pages into the job queue for such a small change. Perhaps we can bundle this with something more substantial at a later date. --Redrose64 🌹 (talk) 20:44, 15 July 2026 (UTC)
There's the discussion above about an extra header showing up in some cases, that would probably be fixed by Special:Diff/1363083377 if someone wants to give that some more thorough testing. Anomie 21:59, 15 July 2026 (UTC)