Template talk:Year nav topic5
This is the discussion/talk page for: Template:Year nav topic
Aesthetics
edit30-April-2007: The aesthetic format & appearance of the "Template:Year_nav_topic" is being analyzed for improvement, considered against the 2,000 articles that use the template. An altered layout was reverted due to doubling the size of the template, which alters the text-wrapping in many of the existing 2,000 articles. -Wikid77 10:44, 30 April 2007 (UTC)
- Okay, I have (just now) compressed the User:Down10-version of the template, to allow the gray-line separators, but not be so tall in using vertical space:
- The User:Modernist wanted the "List of Years in xxx" to be more obvious (at top now), since a lot of detailed information is available (as in "List of years in art").
- The original "Years in xxx" looked somewhat better (shorter), but I am trying to balance the fewer lines with exact-word phrases that previous users recognize easily. The revised template is only 2 lines taller (rather than 7 lines taller). Also, the following changes were made: re-aligned the 21 years; tested alignment with default "1700" was "999"; enlarged current century; in gray-bar, put "or subjects" was "&"; added "Archaeology" as a bottom subject. -Wikid77 13:22, 30 April 2007 (UTC)
- 02-May-2007: In comparing the "Template:Year_nav_topic" to other nav-boxes inside year-in-xxx articles, the other nav-boxes were much dimmer/quieter and less glaring without all the intense/bold wording. I have reduced the darkness of the title bars and unbolded the minor year/decade to reduce the glaring information in the nav-box. The dimmer gray-shades are less distracting in dozens of the existing yearly articles. Also, I have again re-aligned the 21-year selection into a 3x7 alignment which avoids the zigzag bands of subject-years causing eyestrain from the alternating location of each line of subject-years. -Wikid77 10:38, 2 May 2007 (UTC)
Requirements
edit03-May-2007 (revised 08May07): The requirements or constraints for Template:Year_nav_topic have evolved, as follows:
- link to "List of years in xxx" (which is top line now);
- link to other major topic areas (such as Art, Music, Science);
- span at least 20-year range (Many other nav-boxes span 6 years, which seems too limited, whereas 20-year span jumps whole decades);
- restrict width as 300px, to allow text-wrapping at left (wider than 300px can cause crowding of text as 5-words-per-line wrapping, on common 800x600 screens);
- Note: After 7 months use, 290px seems better, because just 10px narrower allows wrapping another word-per-line, as a tiny threshold amount to wider text.
- restrict height as 10 lines, to allow stacking other nav-boxes afterwards (Some literature articles have 50-line nav-boxes which follow immediately after Year_nav_topic, to focus choices on the subject of literature, rather than just years); in April 2007, the height of Year_nav_topic was a 9-line nav-box;
- link to other nav-boxes for expanded choices in navigation, beyond what is shown in the Year_nav_topic;
The Template:Year_nav_topic follows some overarching themes:
- flexibility: a small nav-box cannot be "all things to all people" so techniques must be used for customization, such as:
- provide links to larger nav-box articles (perhaps all years in century);
- allow optional parameters for some customization, as in specialty topics ("video gaming" or "oil painting");
- minimalism: there is a tendency towards "creeping featurism" in group efforts; by limiting the main nav-box, more space is available for stacking specialty nav-boxes afterwards;
- consistency: among the 3,000+ yearly articles, there is a general 2006 defacto standard of nav-box appearance, which is black-and-white, as a corner rectangle, with the core time period denoted by dashes; when the defacto-standard evolves, the appearance of Year_nav_topic should evolve to fit the overall appearance. Currently,
- years are aligned vertically, when possible;
- Note: After 7 months, using en-dashes around central year "-1965-" still aligned vertically, better than using mid-dots around the year.
- years are separated by spaces or superscript-dots (mid-dots are not portable & on some screens appear box-like similar to 2 brackets "[]");
- per WP guidelines, the article subject is in (non-italic) bold, and other options are not bold, unless they are redirections to the same article;
- efficiency: there is a concern "Why is Wikipedia so slow" and some templates invoke dozens of sub-templates or other techniques that might severely impact article-display times; while dozens of embedded HTML comments do not slow a template, beware other issues that cause templates to choke upon display.
The above requirements should be expanded as issues develop further. Stating the general requirements here can help other editors to forsee the constraints that affect the nav-box choices. Thanks. -Wikid77 22:16, 8 May 2007 (UTC)
- Very well put, Wikid77. I made a few adjustments to the template design in order for it to be relatively consistent with other header templates on Wikipedia—typographically, at least. I wasn't aware the use of sub-templates had put significant amount of strain on the servers, but I do see the importance of simplicity (hence the "more"/"…" links, to avoid the desire of editors to pad out the template with extra links).
- However, I didn't see a clear rational for the use of hyphens used around the current article years. They aren't necessary if the central year is already in boldface and larger type, nor do they seem to serve any other useful purpose. I removed them and adjusted the spacing on those lines, respectively. —Down10 TACO 06:26, 7 May 2007 (UTC)
- 09-Jan-2007: (7 months later) Rationale: The hyphens or dashes surrounding the bold-faced year number (such as "-1997-") allowed the wider bold text to be narrower than the alternative use of middots (such as "· 1997 ·"). Although the width difference between dash "-" and middot-space is small, the 2 dashes narrowed the area enough to fit between small-font years and still align vertically, as though all years were the same font-style. The use of dashes satisfied the Requirement (above: "years are aligned vertically") by allowing small-font and bold-font years to align vertically, due to dashes making the bold-font year almost as narrow as the small-font years within mid-dots. -Wikid77 (talk) 03:32, 9 January 2008 (UTC)
Narrowing box width
edit09-Jan-2007: The box was narrowed (today) as "width: 290px;" after discovering that it had been allowed to expand to about 320px width, for about 7 months, due to a lack of testing against requirements and focus. Conflicting issues had caused the option "more..." to be appended to the list of bottom topics, causing the box width to expand by over 7 characters wider than originally designed, perhaps 28px wider. After months of use, the requirement to limit box width to 300px was reduced to recommending 290px for wider text and better n-words-per-line formatting. Just the extra 10px from 300px to 290px seems to cross a critical-width threshold allowing many more words to fit within text-wrapping that formerly split as ragged right margins. A similar critical-width threshold occurs in images that can be enlarged by perhaps 5% to become suddenly much clearer. -Wikid77 (talk) 04:17, 9 January 2008 (UTC)
Edit request
edit{{editprotected}}
This template generates a link like 1700s for the first decade of a given century; however, this page and others like it are now disambiguation pages, because the title might refer to a decade or a century. The link to the first decade of any given century needs to be formatted as [[1700–1709|1700s]]. This affects each link ending with "s]]" in the following section:
-- DECADES -->[[List of decades|…]] <!-- -->[[{{#expr: {{{1|1700}}} - {{{1|1700}}} mod 10 -30}}s]] • <!-- -->[[{{#expr: {{{1|1700}}} - {{{1|1700}}} mod 10 -20}}s]] • <!-- -->[[{{#expr: {{{1|1700}}} - {{{1|1700}}} mod 10 -10}}s]] <!-- -- THIS DECADE --> – '''[[{{#expr: {{{1|1700}}} - {{{1|1700}}} mod 10}}s]]''' – <!-- -->[[{{#expr: {{{1|1700}}} - {{{1|1700}}} mod 10 +10}}s]] • <!-- -->[[{{#expr: {{{1|1700}}} - {{{1|1700}}} mod 10 +20}}s]] • <!-- -->[[{{#expr: {{{1|1700}}} - {{{1|1700}}} mod 10 +30}}s]] [[List of decades|…]] <br><!--
The replacement code is far more complex, unfortunately, but here it is:
-- DECADES -->[[List of decades|…]] <!-- -->[[{{#ifeq:{{#expr:(({{{1|1700}}}-({{{1|1700}}} mod 10))-30) mod 100}} | 0 | {{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))-30}}–{{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))-30+9}}{{!}}}}{{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))-30}}s]] • <!-- -->[[{{#ifeq:{{#expr:(({{{1|1700}}}-({{{1|1700}}} mod 10))-20) mod 100}} | 0 | {{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))-20}}–{{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))-20+9}}{{!}}}}{{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))-20}}s]] • <!-- -->[[{{#ifeq:{{#expr:(({{{1|1700}}}-({{{1|1700}}} mod 10))-10) mod 100}} | 0 | {{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))-10}}–{{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))-10+9}}{{!}}}}{{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))-10}}s]] <!-- -- THIS DECADE --> – '''[[{{#ifeq:{{#expr:(({{{1|1700}}}-({{{1|1700}}} mod 10))) mod 100}} | 0 | {{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))}}–{{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))+9}}{{!}}}}{{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))}}s]]''' – <!-- -->[[{{#ifeq:{{#expr:(({{{1|1700}}}-({{{1|1700}}} mod 10))+10) mod 100}} | 0 | {{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))+10}}–{{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))+10+9}}{{!}}}}{{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))+10}}s]] • <!-- -->[[{{#ifeq:{{#expr:(({{{1|1700}}}-({{{1|1700}}} mod 10))+20) mod 100}} | 0 | {{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))+20}}–{{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))+20+9}}{{!}}}}{{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))+20}}s]] • <!-- -->[[{{#ifeq:{{#expr:(({{{1|1700}}}-({{{1|1700}}} mod 10))+30) mod 100}} | 0 | {{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))+30}}–{{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))+30+9}}{{!}}}}{{#expr:({{{1|1700}}}-({{{1|1700}}} mod 10))+30}}s]] [[List of decades|…]] <br><!--
FWIW, I intentionally left expressions like "-30+9" in the code, rather than simplify them, to make future maintenance easier. --Russ (talk) 12:08, 19 October 2008 (UTC)
- The requested edit has been made and tested in Template:Year nav topic/sandbox, so you can copy and paste the source code from there. --Russ (talk) 10:00, 23 October 2008 (UTC)
- Done. — Huntster (t • @ • c) 04:39, 31 October 2008 (UTC)
New version
editPer WP:HLIST, a group of editors, including me, are replacing pseudo-lists with proper HTML list markup. This is more complaint with HTML standards, and more accessible, especially for users of assistive technologies (such as blind people using screen readers). There's an improved version in this template's sandbox now. Is everyone happy to switch over? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 23:04, 22 December 2011 (UTC)
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
No objections, so please apply the above. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 20:26, 27 December 2011 (UTC)
- Done -- WOSlinker (talk) 20:45, 27 December 2011 (UTC)
Template-protected edit request on 8 June 2015
editThis edit request to Template:Year nav topic has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I modified the sandbox here to have the template try to detect the year from the article title if the first parameter is missing. The template behavior doesn't change if the first parameter is there or if {{Title year}} doesn't find a 4-digit year in the article title.
Ahecht (TALK
PAGE) 17:18, 8 June 2015 (UTC)
- A lot of calls to {{title year}}. Are there any concerns of loading times? Perhaps better to call it once and put the main code in a subtemplate? — Martin (MSGJ · talk) 21:38, 8 June 2015 (UTC)
- Good catch. I moved the bulk of the code to Template:Year_nav_topic/sub to reduce {{Title year}} calls and updated the sandbox. --Ahecht (TALK
PAGE) 14:38, 9 June 2015 (UTC)- I had just come back because I realized that I forgot to pass the subject to the subtemplate, but User:Alakzi beat me to it. --Ahecht (TALK
PAGE) 14:48, 9 June 2015 (UTC)
- I had just come back because I realized that I forgot to pass the subject to the subtemplate, but User:Alakzi beat me to it. --Ahecht (TALK
- Good catch. I moved the bulk of the code to Template:Year_nav_topic/sub to reduce {{Title year}} calls and updated the sandbox. --Ahecht (TALK
- Tests pass, so Done. Alakzi (talk) 14:58, 9 June 2015 (UTC)