Difference between revisions of "User talk:WardPhoenix"

From GodWiki
Jump to navigation Jump to search
m
(→‎Navbox formatting: new section)
Line 3: Line 3:
 
{{archives}}
 
{{archives}}
 
= Leave a note for me there =
 
= Leave a note for me there =
 +
 +
== Navbox formatting ==
 +
 +
Hey, {{tlx|Navbox pets}} is a great idea! How did we not think of that sooner?
 +
 +
I made a couple of changes to the code, just wanted to fill you in on them.
 +
 +
# Group names (especially if they're wide or nested) tend to be a problem on mobile, since they end up eating all of the available width of the table. I realized with {{tlx|Navbox JanuWiki 2019}} that it made more sense to use the {{para|above|<var>title</var>}} parameter with {{tlx|Navbox subgroup}}, and create a separate row for the heading, instead of burning up width. So, I made the same change at {{tlx|Navbox pets}}. See what you think. (I'm questioning whether the "Normal" is even really necessary, or just implied...)<br><br>
 +
# <p>You '''DEFINITELY''' want to use {{tlx|Navbox items}}, instead of {{tlx|Navbox list}}, when building infoboxes. {{tlx|Navbox list}} was {{U|Djonni}}'s first version of the template, and we addressed a lot of its shortcomings with the replacement {{tlx|Navbox items}}. (The documentation unfortunately didn't all get updated to reflect that change.) Our plan, way back when, was to go through and replace all of the {{tlx|Navbox list}} transclusions with {{tlx|Navbox items}}, and then deprecate that template. Unfortunately that never got done either.</p><p>The biggest advantage to {{tlx|Navbox items}} is that it'll autolink the parameters for you (unless you turn that off with {{para|mode|nolink}}), so for example this:<pre style="margin-left:1.6em:">{{Navbox list| [[Ballpoint Penguin]] || [[Biowolf]] || [[Bipolar Bear]] | [[Crypt Creeper]] | [[Dreaded Gazebo]] | [[Dust Bunny]] | [[Firefox]] | [[Hyper Lynx]] | [[Lightsaber-Toothed Tiger]] | [[Ninja Tortoise]] | [[Rocky Raccoon]] | [[Santa Claws]] | [[Satan Claus]] | [[Significant Otter]] | [[Sun Dog]] | [[Talking Donkey]] | [[Terror Bull]] | [[Vogon Poet]] | }}</pre>becomes this:<pre>{{Navbox items| Ballpoint Penguin || Biowolf || Bipolar Bear | Crypt Creeper | Dreaded Gazebo | Dust Bunny | Firefox | Hyper Lynx | Lightsaber-Toothed Tiger | Ninja Tortoise | Rocky Raccoon | Santa Claws | Satan Claus | Significant Otter | Sun Dog | Talking Donkey | Terror Bull | Vogon Poet | }}</pre><p><p>The other advantage is that {{tlx|Navbox items}} by default ''allows'' the items to be word-wrapped, which (again, for mobile) tends to be better since it means less space is wasted. That can also be turned off if needed with {{para|wrap|no}}.</p>
 +
Anyway, I pulled the code into an editor and converted all of the lists to {{tlx|Navbox items}} with a quick regexp to drop the square brackets. -- [[User:FeRDNYC|FeRDNYC]] ([[User talk:FeRDNYC|talk]]) 20:59, 20 April 2019 (UTC)

Revision as of 20:59, 20 April 2019

This is a talk page. Maybe. Or not. Don't know. Leaving this just in case : GodWardPhoenix (U • C • T) 


This page has an archive

Old and/or inactive discussions have been moved to the /Archive subpage.

Leave a note for me there

Navbox formatting

Hey, {{Navbox pets}} is a great idea! How did we not think of that sooner?

I made a couple of changes to the code, just wanted to fill you in on them.

  1. Group names (especially if they're wide or nested) tend to be a problem on mobile, since they end up eating all of the available width of the table. I realized with {{Navbox JanuWiki 2019}} that it made more sense to use the |above=title parameter with {{Navbox subgroup}}, and create a separate row for the heading, instead of burning up width. So, I made the same change at {{Navbox pets}}. See what you think. (I'm questioning whether the "Normal" is even really necessary, or just implied...)

  2. You DEFINITELY want to use {{Navbox items}}, instead of {{Navbox list}}, when building infoboxes. {{Navbox list}} was Djonni's first version of the template, and we addressed a lot of its shortcomings with the replacement {{Navbox items}}. (The documentation unfortunately didn't all get updated to reflect that change.) Our plan, way back when, was to go through and replace all of the {{Navbox list}} transclusions with {{Navbox items}}, and then deprecate that template. Unfortunately that never got done either.

    The biggest advantage to {{Navbox items}} is that it'll autolink the parameters for you (unless you turn that off with |mode=nolink), so for example this:

    {{Navbox list| [[Ballpoint Penguin]] || [[Biowolf]] || [[Bipolar Bear]] | [[Crypt Creeper]] | [[Dreaded Gazebo]] | [[Dust Bunny]] | [[Firefox]] | [[Hyper Lynx]] | [[Lightsaber-Toothed Tiger]] | [[Ninja Tortoise]] | [[Rocky Raccoon]] | [[Santa Claws]] | [[Satan Claus]] | [[Significant Otter]] | [[Sun Dog]] | [[Talking Donkey]] | [[Terror Bull]] | [[Vogon Poet]] | }}
    becomes this:
    {{Navbox items| Ballpoint Penguin || Biowolf || Bipolar Bear | Crypt Creeper | Dreaded Gazebo | Dust Bunny | Firefox | Hyper Lynx | Lightsaber-Toothed Tiger | Ninja Tortoise | Rocky Raccoon | Santa Claws | Satan Claus | Significant Otter | Sun Dog | Talking Donkey | Terror Bull | Vogon Poet | }}

    The other advantage is that {{Navbox items}} by default allows the items to be word-wrapped, which (again, for mobile) tends to be better since it means less space is wasted. That can also be turned off if needed with |wrap=no.

Anyway, I pulled the code into an editor and converted all of the lists to {{Navbox items}} with a quick regexp to drop the square brackets. -- FeRDNYC (talk) 20:59, 20 April 2019 (UTC)