Template:Infobox is permanently
protected from editing because it is a
heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by
consensus, editors may use {{
edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's
documentation to add usage notes or
categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
This is the
talk page for discussing improvements to the
Infobox template. |
|
Archives: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19Auto-archiving period: 90 days |
Infoboxes | ||||
|
Text has been copied to or from this page; see the list below. The source pages now serve to
provide attribution for the content in the destination pages and must not be deleted as long as the copies exist. For attribution and to access older versions of the copied text, please see the history links below.
|
Related pages |
---|
I've stumbled upon a buggy interaction of
Template:Infobox ethnic group with
Template:Plainlist in article
Ainu people. There, the list after "Religion" has the list markers, despite being generated using template {{
plainlist}}. In the generated HTML, somehow the tags <ul>...</ul>
are missing. Only the outer wrapper <div class="plainlist">...</div>
and list items (<li>...</li>
) are present in the HTML. This makes it so that CSS code list-style: none
from
Template:Plainlist/styles.css#L-5 isn't triggered, because the CSS selector for the rule is .plainlist ol, .plainlist ul
.
I have reduced the reproducing sample to two test cases at
Template:Infobox/testcases#Template:Plainlist. Feel free to rename and/or move it as you see fit. This only happens when there is a list in |label(n)=
and
Template:Plainlist is in the next |data(n+1)=
(or in |data(n+2)=
if there is a |header(n+1)=
). Compare label1 with a list
vs label1 without a list
. —
andrybak (
talk) 21:49, 10 October 2023 (UTC)
label
misses the point of what a label is.fixChildBoxes
in some way. Either it's not covering some remixing, or it's not doing it in the right place, or it's not being called on such and sundry inputs.
Izno (
talk) 18:17, 11 October 2023 (UTC)
I would like to use the infobox template to create a new particular infobox template (an ancient polis infobox template) and employ it in multiple articles for the Ancient Greek Wikipedia.
I've tried to do so; however, I encountered problems, because (apparently) the existent module could only be used in the English Wikipedia. Thus, I re-created (i.e., copy-pasted) the module in the Ancient Greek Wikipedia Incubator. Here is the copy-pasted module: https://incubator.wikimedia.org/wiki/Module:Wp/grc/Infobox
I also had to re-create many modules and templates, necessary to make the infobox template work, in particular this, since I got an error message: https://incubator.wikimedia.org/wiki/Module:Wp/grc/Infobox/styles.css
Here is the "ancient polis" infobox template, the new template I created based on the infobox module: https://incubator.wikimedia.org/wiki/Template:Wp/grc/Πινάκιον_Ἀρχαία_Πόλις
Here is an article in which I use the new template: https://incubator.wikimedia.org/wiki/Wp/grc/Ἀγύριον_(ἀρχαία_πόλις)
As you can see:
1) The style is not right (the infobox should look more or less like this: /info/en/?search=Megara );
2) Furthermore, I'm unable do add images;
3) Lastly, I'm unable to add an interactive map.
Could someone kindly help?
Thank you very much!
- Anaxicrates ( talk) 14:55, 11 November 2023 (UTC)
-
(the
hyphen), that is only wikitext when it is preceded by |
and both appear at the beginning of the line. A similar comment about asking there.
Izno (
talk) 18:36, 12 November 2023 (UTC)
While researching dark mode (and alternatives to the current invert approach), I becamecurious about the background (pardon the pun) of the background colors used on infoboxes and was only able to find the historic artifact Wikipedia:Infobox_colours (not sure if there is a modern alternative?).
For example on Paris the infobox-subheader has a background color of #cddeff, COVID-19 has an .infobox-above with a background of #ccc. In COVID-19_pandemic_in_Hubei it is red... I am not sure what these colors mean... Generally I see infoboxes have a #f8f9fa background (e.g. Drew Barrymore)
Has anyone ever discussed replacing/reinforcing them with patterns/icons or removing those colors altogether? If they're not recommended is their a style guide with agreed recommendations on wiki?
(Side note: The Trello feature and this blog post makes very interesting reading https://wearecolorblind.com/examples/trello-colorblind-friendly-mode/ and I was curious if any of it could be applied to in article content)
@ TheDJ: @ Izno: who likely can give me the history lesson I need here (please do ping others!)... Jdlrobson ( talk) 02:29, 18 November 2023 (UTC)
In mobile, infoboxes collapse to full screen at lower resolution. It's been annoying me that this behaviour is not present in Vector 2022 as I've been increasingly experimenting with using this skin on mobile.
The code in question is here and is pretty well battle-tested (over 10 years in production): https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/master/resources/skins.minerva.base.styles/content/hacks.less#L37
Would it be controversial to move these infobox related styles into Module:Infobox/styles.css or some other on-wiki stylesheet?
Thanks in advance for your thoughts! Jdlrobson ( talk) 20:09, 27 December 2023 (UTC)
I suggest to think how could we improve the
accessibility and semantics for bulleted subheaders like
this (see
Alaska) which are present in
many infoboxes in some varieties (e.g. bold, not bold, with different spacing). Not only is there no semantic/accessible markup here, there is no markup here at all, these are just plain •
.
I find it difficult to say, though, how this should be structured best. Semantically, I think, "Language" and "Time zones" on the screenshot are sections/divisions of the table with a title, so "Official languages" and "Spoken language" are like the other table headers, just inside this section. But we can't use
multiple <tbody>
elements in MediaWiki, so I'm not aware how such sections could be isolated.
There are other complexities as well. Sometimes you have a section header that is a key in a key–value pair itself (e.g. "Government" in {{ Infobox country}}, see Antigua and Barbuda: "Government: Unitary parliamentary constitutional monarchy"). There can also be "subitems" like "Summer (DST)" on the screenshot.
For key–value pairs,
<dl>
element is best suited (generated by ;:
markup), so one could come up with a structure like this:
; East of 169°30'
: UTC−09:00
:; Summer (DST)
:: UTC−18:00
that would translate into this HTML:
<dl>
<dt>East of 169°30'</dt>
<dd>
UTC−09:00
<dl>
<dt>Summer (DST)</dt>
<dd>UTC−18:00</dd>
</dl>
</dd>
</dl>
But then you would have difficulties to style the elements in such a way that all headers are on the left, and all values are on the right – and to make the widths of the left and right precisely match their widths in the rest of the inbofox.
That said, using semantic tags is not the only way to make an accessible layout: ARIA roles and attributes may come in handy just as well. Jack who built the house ( talk) 15:24, 6 January 2024 (UTC)
Is there any way to add a parameter for making an infobox collapsible? This would be extremely helpful for some very lengthy templates that take up useful page real estate. See Template talk:Infobox nutritional value#Needs to be collapsible for an example of what I mean. Cheers! – Kittycataclysm ( talk) 23:40, 28 April 2024 (UTC)
Thanks all for the notes! In this case, based on the linked MOS, it seems like collapsing sections in Template:Infobox nutritional value is a reasonable and viable option—I'll propose this on the talk page. Additionally, based on the above comments, it seems like this feature is already built in as a parameter in infoboxes. I may sandbox to test and/or request technical assistance. Cheers — Kittycataclysm ( talk) 12:29, 30 April 2024 (UTC)
Template:Infobox is permanently
protected from editing because it is a
heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by
consensus, editors may use {{
edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's
documentation to add usage notes or
categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
This is the
talk page for discussing improvements to the
Infobox template. |
|
Archives: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19Auto-archiving period: 90 days |
Infoboxes | ||||
|
Text has been copied to or from this page; see the list below. The source pages now serve to
provide attribution for the content in the destination pages and must not be deleted as long as the copies exist. For attribution and to access older versions of the copied text, please see the history links below.
|
Related pages |
---|
I've stumbled upon a buggy interaction of
Template:Infobox ethnic group with
Template:Plainlist in article
Ainu people. There, the list after "Religion" has the list markers, despite being generated using template {{
plainlist}}. In the generated HTML, somehow the tags <ul>...</ul>
are missing. Only the outer wrapper <div class="plainlist">...</div>
and list items (<li>...</li>
) are present in the HTML. This makes it so that CSS code list-style: none
from
Template:Plainlist/styles.css#L-5 isn't triggered, because the CSS selector for the rule is .plainlist ol, .plainlist ul
.
I have reduced the reproducing sample to two test cases at
Template:Infobox/testcases#Template:Plainlist. Feel free to rename and/or move it as you see fit. This only happens when there is a list in |label(n)=
and
Template:Plainlist is in the next |data(n+1)=
(or in |data(n+2)=
if there is a |header(n+1)=
). Compare label1 with a list
vs label1 without a list
. —
andrybak (
talk) 21:49, 10 October 2023 (UTC)
label
misses the point of what a label is.fixChildBoxes
in some way. Either it's not covering some remixing, or it's not doing it in the right place, or it's not being called on such and sundry inputs.
Izno (
talk) 18:17, 11 October 2023 (UTC)
I would like to use the infobox template to create a new particular infobox template (an ancient polis infobox template) and employ it in multiple articles for the Ancient Greek Wikipedia.
I've tried to do so; however, I encountered problems, because (apparently) the existent module could only be used in the English Wikipedia. Thus, I re-created (i.e., copy-pasted) the module in the Ancient Greek Wikipedia Incubator. Here is the copy-pasted module: https://incubator.wikimedia.org/wiki/Module:Wp/grc/Infobox
I also had to re-create many modules and templates, necessary to make the infobox template work, in particular this, since I got an error message: https://incubator.wikimedia.org/wiki/Module:Wp/grc/Infobox/styles.css
Here is the "ancient polis" infobox template, the new template I created based on the infobox module: https://incubator.wikimedia.org/wiki/Template:Wp/grc/Πινάκιον_Ἀρχαία_Πόλις
Here is an article in which I use the new template: https://incubator.wikimedia.org/wiki/Wp/grc/Ἀγύριον_(ἀρχαία_πόλις)
As you can see:
1) The style is not right (the infobox should look more or less like this: /info/en/?search=Megara );
2) Furthermore, I'm unable do add images;
3) Lastly, I'm unable to add an interactive map.
Could someone kindly help?
Thank you very much!
- Anaxicrates ( talk) 14:55, 11 November 2023 (UTC)
-
(the
hyphen), that is only wikitext when it is preceded by |
and both appear at the beginning of the line. A similar comment about asking there.
Izno (
talk) 18:36, 12 November 2023 (UTC)
While researching dark mode (and alternatives to the current invert approach), I becamecurious about the background (pardon the pun) of the background colors used on infoboxes and was only able to find the historic artifact Wikipedia:Infobox_colours (not sure if there is a modern alternative?).
For example on Paris the infobox-subheader has a background color of #cddeff, COVID-19 has an .infobox-above with a background of #ccc. In COVID-19_pandemic_in_Hubei it is red... I am not sure what these colors mean... Generally I see infoboxes have a #f8f9fa background (e.g. Drew Barrymore)
Has anyone ever discussed replacing/reinforcing them with patterns/icons or removing those colors altogether? If they're not recommended is their a style guide with agreed recommendations on wiki?
(Side note: The Trello feature and this blog post makes very interesting reading https://wearecolorblind.com/examples/trello-colorblind-friendly-mode/ and I was curious if any of it could be applied to in article content)
@ TheDJ: @ Izno: who likely can give me the history lesson I need here (please do ping others!)... Jdlrobson ( talk) 02:29, 18 November 2023 (UTC)
In mobile, infoboxes collapse to full screen at lower resolution. It's been annoying me that this behaviour is not present in Vector 2022 as I've been increasingly experimenting with using this skin on mobile.
The code in question is here and is pretty well battle-tested (over 10 years in production): https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/master/resources/skins.minerva.base.styles/content/hacks.less#L37
Would it be controversial to move these infobox related styles into Module:Infobox/styles.css or some other on-wiki stylesheet?
Thanks in advance for your thoughts! Jdlrobson ( talk) 20:09, 27 December 2023 (UTC)
I suggest to think how could we improve the
accessibility and semantics for bulleted subheaders like
this (see
Alaska) which are present in
many infoboxes in some varieties (e.g. bold, not bold, with different spacing). Not only is there no semantic/accessible markup here, there is no markup here at all, these are just plain •
.
I find it difficult to say, though, how this should be structured best. Semantically, I think, "Language" and "Time zones" on the screenshot are sections/divisions of the table with a title, so "Official languages" and "Spoken language" are like the other table headers, just inside this section. But we can't use
multiple <tbody>
elements in MediaWiki, so I'm not aware how such sections could be isolated.
There are other complexities as well. Sometimes you have a section header that is a key in a key–value pair itself (e.g. "Government" in {{ Infobox country}}, see Antigua and Barbuda: "Government: Unitary parliamentary constitutional monarchy"). There can also be "subitems" like "Summer (DST)" on the screenshot.
For key–value pairs,
<dl>
element is best suited (generated by ;:
markup), so one could come up with a structure like this:
; East of 169°30'
: UTC−09:00
:; Summer (DST)
:: UTC−18:00
that would translate into this HTML:
<dl>
<dt>East of 169°30'</dt>
<dd>
UTC−09:00
<dl>
<dt>Summer (DST)</dt>
<dd>UTC−18:00</dd>
</dl>
</dd>
</dl>
But then you would have difficulties to style the elements in such a way that all headers are on the left, and all values are on the right – and to make the widths of the left and right precisely match their widths in the rest of the inbofox.
That said, using semantic tags is not the only way to make an accessible layout: ARIA roles and attributes may come in handy just as well. Jack who built the house ( talk) 15:24, 6 January 2024 (UTC)
Is there any way to add a parameter for making an infobox collapsible? This would be extremely helpful for some very lengthy templates that take up useful page real estate. See Template talk:Infobox nutritional value#Needs to be collapsible for an example of what I mean. Cheers! – Kittycataclysm ( talk) 23:40, 28 April 2024 (UTC)
Thanks all for the notes! In this case, based on the linked MOS, it seems like collapsing sections in Template:Infobox nutritional value is a reasonable and viable option—I'll propose this on the talk page. Additionally, based on the above comments, it seems like this feature is already built in as a parameter in infoboxes. I may sandbox to test and/or request technical assistance. Cheers — Kittycataclysm ( talk) 12:29, 30 April 2024 (UTC)