Jump to content

User:Zackmann08/Chembox

From Wikipedia, the free encyclopedia

TODO

[edit]

Before merge can happen

[edit]

After merger starts

[edit]

Done

[edit]

Future enhancements

[edit]
This is for things to consider down the road as possible improvements.
I don't want to change the look and feel of the template too much during this transition.
  • {{Infobox chemical/calc temps}} should be able to use {{convinfobox}}
  • Consider WP:TEMPLATECAT. Should we really be applying categories with the template?
  • |DetonationV= in {{Infobox chemical/explosive}} should be converted
  • Remove bordered class from Infobox
  • Copy all parameters into main infobox? (so that people don't need to know which subtemplates to use)
  • Regroup solubility parameters so they lie under a single subheader? (reducing the overuse of the word "solubility")

Questions & General Notes

[edit]
  • Is there a case where there would be a left image and no corresponding right image?
  • |Watchedfields= is not a supported param anymore. This is intentional. If you trace the param it goes {{Chembox}}{{Chembox Footer}}{{Chembox verification}} where it is never actually used. Therefore it can simply be removed. See this diff.

Improvements

[edit]

The end goal here is that the new template should look nearly identical when rendered on a page. Additionally, the process for implementing the template on a page is almost identical. Below are some of the many improvements that were implemented during the conversion.

  • Uses {{Infobox}} as a base. The use of the Infobox template and module as a base is in line with over 99% of the Infobox templates on the English Wiki. This thoroughly documented and tested template keeps infoboxes consistent across the site and is responsible for many of the features described below. Downstream users of Wikipedia use the common structure of {{Infobox}} to scrape data from them or hide them (as necessary).
  • In line with WP:ACCESSIBILITY. Perhaps the biggest difference between how the two templates render is size. You will notice in the side by side comparison that some things things are showing up bigger than before, but this follows the requirements of WP:ACCESSIBILITY.
  • Fewer templates to maintain. {{Chembox}} has separate templates for nearly every single row in the table, adding up to well over 200 separate templates, more than is necessary. This implementation shrinks that down to under 20 making things much easier to maintain, update and build on in the future. It does this while still maintaining the same functionality.
  • Builds on the style, look and feel of {{Infobox drug}}. The Infobox drug template, formally known as {{Drugbox}} was also converted to use {{Infobox}}. This implementation of {{Infobox chemical}} uses many of the same styles and subtemplates as that reducing overhead and duplication of code.
  • Implements much better Check for unknown params. The use of Module:TemplatePar is fine, but it has a much more narrow scope and is not nearly as well documented or maintained as Module:Check for unknown parameters. This module is used on over 8,000,000 pages.
  • Reduces WP:OVERLINK & MOS:DUPLINK. Nearly every label in {{Chembox}} is linked including things like Eye Hazard which have no reason to be linked and violate the aforementioned policies.
  • From the editors point of view, works the same. These templates will work exactly the same as the {{Chembox}} series of templates. NO parameters have changed. So apart from having to call {{Infobox chemical}} instead of {{Chembox}}, there is no change to how editors will use the templates. No new parameters & no new syntax. As per the other points made here, there are certainly some minor stylistic changes to how the template renders, but I want to be clear that for the editor, nothing new except for calling a different template.
  • Retains the subtemplate structure of Chembox. There has often been discussion about the multi template structure of the Chembox. ({{Chembox Hazards}}, {{Chembox Identifiers}}, etc.). The use of these templates also has NOT been changed. You can still put the hazard section or the identifiers section, etc. in any order you want. I intentionally kept that the same. The subtemplates have also been converted as part of this process. So {{Chembox Hazards}}{{Infobox chemical/hazards}}.

I invite you all to take a look at this new possible implementation. Be sure to check out the testcases that provide a side by side comparison of the Chembox implementation versus the new Infobox based one:

Old {{chembox}} version {{Infobox chemical}} equivalent Testcases
{{Chembox Identifiers}} {{Infobox chemical/identifiers}} testcases
{{Chembox Properties}} {{Infobox chemical/properties}} testcases
{{Chembox Structure}} {{Infobox chemical/structure}} testcases
{{Chembox Thermochemistry}} {{Infobox chemical/thermochemistry}} testcases
{{Chembox Explosive}} {{Infobox chemical/explosive}} testcases
{{Chembox Pharmacology}} {{Infobox chemical/pharmacology}} testcases
{{Chembox Hazards}} {{Infobox chemical/hazards}} testcases
{{Chembox Related}} {{Infobox chemical/related}} testcases
{{Chembox Supplement}} {{Infobox chemical/supplement}} testcases

Old templates still used

[edit]
Template Old chembox subtemplates used
{{Infobox chemical}} None
{{Infobox chemical/identifiers}} None
{{Infobox chemical/properties}} None
{{Infobox chemical/structure}} None
{{Infobox chemical/thermochemistry}} None
{{Infobox chemical/explosive}} None
{{Infobox chemical/pharmacology}} None
{{Infobox chemical/hazards}} None
{{Infobox chemical/related}} None
{{Infobox chemical/supplement}} None

Status

[edit]
Template Basic Documentation Auto-Categories Chk4Unknw Param Check WP:TDATA WP:TPE
{{Infobox chemical}} Yes Yes Yes
{{Infobox chemical/identifiers}} Yes Question?Param check Yes Yes
{{Infobox chemical/properties}} Yes Yes Yes
{{Infobox chemical/structure}} Yes Yes Yes
{{Infobox chemical/thermochemistry}} Yes Yes Yes Yes
{{Infobox chemical/explosive}} Yes Yes Yes Yes
{{Infobox chemical/pharmacology}} Yes Yes Yes Yes
{{Infobox chemical/hazards}} Yes Yes Yes Yes
{{Infobox chemical/related}} Yes Yes Yes Yes
{{Infobox chemical/supplement}} Yes Yes

Discussion posts

[edit]
  1. on Chembox
  2. WikiProject Chemicals
  3. WikiProject Chemistry
  4. WikiProject Templates

Users

[edit]
[edit]

[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]