User:Izno/Sandbox/Infobox

This page documents some potential new ways to make the meta template/module Template:Infobox. It's a sketch to work out what the template should output at the end of the day.

Alternatives
Con of current: The majority of the parameters you put in (aside from the label/data parameters) are not tabular. Note "full data cells" are also not tabular but usually contain only child infoboxes. And even the label/data parameters are not particularly tabular (i.e. could be represented as key-value pairs i.e. with an HTML description list).

Con of current: We have to go through pain and misery to embed child infoboxes. Or at least, the kind that have the same column boundaries as the parent template, which in general have to assume the parent structure in some way. Either way will need to care about this during some future conversion. We'd also like to avoid the style element associated with the child infobox's TemplateStyles from showing up in some weird location due to the HTML 5 fostering algorithm. (Do we want the 'embedded' version to output the same styles as the parent infobox or as the embedded infobox???)

Con of alternatives: Labels/data no longer are nicely columnar without explicit CSS? Maybe not even then? We could set display to table-cell but then we have to wrap each 'row' in a div or something, which might work with a pure-div solution or a mixed table solution but not with a description list.

Con of alternatives: Auto headers have to be turned on everywhere? (That's a good thing in the general but requires care in implementation...)

Con? of alternatives: Graham's comments about liking being able to browse to each th. The other infoboxes in the world use divs, so not sure how useful this seems. Could add roles to each div for lists which would adjust the below div versions a bit.

Inner tables
... repeat for N headers

"Basic" div "tables"
This could be done with infobox-rows set to display: grid I think. User:Izno/Sandbox/Infobox/template and User:Izno/Sandbox/Infobox/template/styles.css

Migration tracking
Some comments about migrations.

When we do migrate, we need to fix some infoboxes that assume they are tables in their CSS i.e. those that were .bordered and .geography before their TemplateStyling in MediaWiki talk:Common.css/to do and MediaWiki talk:Common.css/to do. The list is replicated here (a decent backup might be this or this):


 * Template:Infobox administrative divisions of China/styles.css
 * Template:Infobox baseball biography/styles.css
 * Template:Chembox/styles.css
 * Template:Infobox combinatorial classes/styles.css
 * Template:Infobox Confederate State ACW/styles.css
 * Template:Infobox country/styles.css
 * Template:Infobox former subdivision/styles.css
 * Template:Infobox French constituency/styles.css
 * Template:Infobox political division/styles.css
 * Template:Infobox probability distribution/styles.css
 * Template:Reactionbox/styles.css
 * Template:Infobox Russian constituency/styles.css
 * Template:Infobox settlement/styles.css
 * Template:Infobox time zone/styles.css
 * Template:Infobox UK place/styles.css
 * Template:Infobox urban feature/styles.css

There are also some templates that are not directly derived from the infobox template that assume its structure is tabular, like listed at Module talk:Sidebar/Archive 5.

MediaWiki:Common.css/to do also contains a series of templates that will be converted at some point to use infobox. It is possible not all of them will be converted so we will need to check in for those.