Template talk:NZ parlbox

Term?
The column 'Term' can be misleading: it could be taken as the term the MP has served, rather than the term of Parliament. Why not revert to the 'Parl.' header? Adabow (talk) 03:13, 25 July 2009 (UTC)
 * One of the complaints about the old format was the use of abbreviations. Personally I am quite happy to use "Parl." or anything else anyone can think of. Perhaps first run it by the original discussion however. Mattlore (talk) 23:43, 25 July 2009 (UTC)

Year
Can we add a parameter that can be used if the MP is only sitting in one year? in &#123;&#123;Infobox Officeholder&#125;&#125; "term" can be used instead of "term_start" and "term_end"; can we create something similar here? I would do it, but even after looking at the &#123;&#123;Infobox Officeholder&#125;&#125;, I can't figure it out....

See Rod Donald and Louisa Wall for examples of where this could be useful.

Adabow ( talk )  08:39, 3 October 2009 (UTC)


 * Just saw your comment the other day; it works that way now but it wont automatically put "present" in if left blank. Mattlore (talk) 07:28, 1 February 2010 (UTC)

Change of party
What is the convention of use of this template when an MP changes parties (eg see Tariana Turia)? It looks quite odd doubling most fields up; is there a way to merge the two rows? Adabow ( talk )  12:07, 9 April 2010 (UTC)
 * So far they I've just doubled them up. It does look pretty messy at times (especially for 1993-1999 MPs who changed parties) but I have yet to find a solution. Mattlore (talk) 23:46, 18 April 2010 (UTC)

Alignment
Can we have an optional parameter (with right as default), so that if it is more suitable to have the table aligned to the left, it can be done? Adabow ( talk )  23:20, 18 April 2010 (UTC)
 * Hey, I'll try and have a play with it sometime this week to see if I can add that feature (or someone else can). Its never come up before as all the old "parlbox's" were always right aligned. Its a good idea though, would work a lot better for the Ministers with the right aligned infobox. Mattlore (talk) 23:37, 18 April 2010 (UTC)
 * Cheers Adabow  ( talk )  23:42, 18 April 2010 (UTC)
 * adding "align=left" into the parlbox header should now work :) Mattlore (talk) 00:45, 1 May 2010 (UTC)

Year range
The template produces a year range. Two things should be done differently in my opinion: Thanks.  Schwede 66  09:16, 21 July 2010 (UTC)
 * 1) It should use endashes – the template would need amending for that.
 * 2) Where the year range doesn't go across a century, the closing years should be in YY format, rather than YYYY. The documentation would need updating. I'm happy to copy the relevant bits from WP:YEAR across, or refer to it.


 * It does use en dashes at the moment, so that's fine. I prefer the YYYY format twice, but as the MoS says to use YY then I'm not objecting to something being added to the documentation. Adabow (talk) 09:31, 21 July 2010 (UTC)


 * Are you sure about the endashes?  Schwede 66  10:34, 21 July 2010 (UTC)


 * Yep, I just copied-and-pasted an endash and clicked 'show changes', and there was no difference. Adabow (talk) 06:43, 22 July 2010 (UTC)


 * We can't be talking about the same thing, Adabow. In James FitzGerald's parlbox, I've just copied the dash between 1853 and 1855, pasted it somewhere else, and it was a simple dash and not an endash.  Schwede 66  04:39, 23 July 2010 (UTC)


 * I was talking about the template's code. I'll try changing it to the html syntax for and en dash, and see if that makes a difference. Adabow (talk · contribs) 04:42, 23 July 2010 (UTC)

Silly me - I didn't see that I can edit the template code myself. This works - thanks.  Schwede 66  04:54, 23 July 2010 (UTC)

List MPs

 * colspan=5 align=center| (example, with electorate)
 * colspan=5 align=center| (example, with electorate)

As I've been reformatting the List MPs sections of electorates I've run into a problem inherent in these parlbox templates. Unless there is a comprehensive History of a List MP's terms it is often unclear where (or if) they stood as candidates. From reading Chris Finlayson's parlbox you get no clue that he stood in, &  in ,  &  respectively. Would the second example be a good way of expressing this, or is it not clear enough? Fan |  talk  10:02, 21 December 2011 (UTC)
 * I think this is a problem best addressed in the prose rather than in the parlbox. Where a candidate stood in the election is related to that election whereas the parlbox deals with who they represent in parliament. Some MPs do base themselves in the electorate they stood in at the election while others change completely. Twyford for example, stood in North Shore in 08 but his office was in Auckland Central until he moved to Te Atatu. The parlbox should only indicate how and when they were elected. Mattlore (talk) 19:13, 21 December 2011 (UTC)
 * As the parlbox shows parliament terms, and list status and position (alongside electorates represented, if applicable) it is not solely concerned with the "how and when they were elected" - if an MP is elected to an electorate their list position is irrelevant and by your reasoning is "best addressed in the prose". The parlbox otherwise records both an MP's electoral and parliamentary histories, regardless of the intentions when it was designed and to consign one significant piece of data to a highly variable prose section seems to be counter-intuitive. To discover where a list MP stood in the (where this is not in the prose already) an editor needs to search through electorate articles  to  to find the information, and if it doesn't exist there through omission or because the MP in question was a list-only candidate, then repeat the search at electionresults 1996. In summary, my question was how can we include this data and not what reasons do we have for not including this data ... because I don't feel there is a case for excluding the data, other than the template wasn't designed for that - and surely that's the issue we should be addressing. Finally, Phil Twyford's status as a candidate in  is relevant, as is his status as a list MP - whether his office was in Central Auckland or Invercargill or Waikikamukau is not relevant.Fan  |  talk  03:13, 22 December 2011 (UTC)

{| table class="wikitable" width="350px" border=4 cellpadding=2 cellspacing=0 align= style="margin-left:1em"
 * colspan=5| Parliament of New Zealand
 * width=25%| Years
 * width=10%| Term
 * width=25%| Years
 * width=10%| Term


 * width=25%| Party


 * I agree that the information should be included in the article. I just don't think it belongs in the parlbox, I believe it belongs in the prose of the article itself. The parlbox records the persons elected history, not their candidate history. They are elected as a List MP, that is relevant. That they placed third in Coromandel is not. The information you are suggesting on adding is similar to the fact that Barry Brill ran in the 2011 election and was not elected. It is notable and worthy of inclusion in the article but it does not belong in the parlbox. I answered your question initially; I believe it is best included in the text of the article. Mattlore (talk) 03:44, 22 December 2011 (UTC)
 * The way I understand what Fanx is suggesting is to record in addition to what we already do is to show the electorate contested (if applicable) if somebody made it into Parliament via the list. That seems a useful piece of information to include. In parallel, we should also have 'Party lists by election year articles', but that's another issue. Back to the parlbox, I wouldn't like to see the heading break over two lines. Maybe we could generate a footer (when needed) that explains the situation of the electorate in brackets given after 'List'.  Schwede 66  04:12, 22 December 2011 (UTC)
 * And on that aside Schwede. Mattlore (talk) 04:22, 22 December 2011 (UTC)

Parlbox
Copied from Schwede's talk page

Happy New Years Schwede. I noticed that you prefer the look generated by - in the parlboxs - should we add that to the code rather than to each box individually or is something that you only prefer to add some of the time? Mattlore (talk) 20:23, 3 January 2012 (UTC)
 * HNY to you, too. I usually take my guidance from MOS, but WP:YEAR is one of the areas that is poorly documented. For example, it expresses a preference for year ranges to be shown like (1881–86), but I've had a lengthy discussion with somebody who looks after British politics articles that it has always been four digit years for the closing years, and in fact the change to MOS was made without discussion. Ah well, so I've adopted the four digit closing year as per longstanding British practice. The other issue is that when words are part of the range, then the endash has spaces on either side, which is why I've been converting parlboxes 'on sight'. But again, this is not documented at all in MOS.


 * If that could be incorporated into the code, that would be fantastic!  Schwede 66  22:18, 3 January 2012 (UTC)
 * Ah, I see. I didn't fully understand the MOS requirements. That might have to go in the too hard basket for now unfortunately as I'm not sure about getting the box to recognise text instead of numbers. As an aside, I have always preferred the four digit style over the two. I thought the MOS stated both were acceptable, but obviously it now has a preference. Mattlore (talk) 22:30, 3 January 2012 (UTC)
 * I suppose we can set our own rules for how a parlbox is laid out. I'll shift this discussion to the parlbox talk page sometime later; that's probably where it should be.  Schwede 66  00:05, 4 January 2012 (UTC)

Accessibility problems
The colour-contrast ratio between pink background and blue and especially red links in this template on Ethel McMillan do not meet WCAG standards for accessibility (see MOS:COLOUR for more info). What's the best way to remedy this? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 22:56, 9 September 2012 (UTC)
 * Hmmm, the most obvious solution is to turn the red and blue links into Black Text  but that'd require a rewrite of the code and apply to all articles. It would also make the links impossible to distinguish. Any other suggestions? Mattlore (talk) 23:29, 9 September 2012 (UTC)
 * one possibility would be to use border coloring either on the Party cell, or the entire row. or, we could use a background color on the actual party text. Frietjes (talk) 15:59, 10 September 2012 (UTC)


 * Both those samples would work for me.  Schwede 66  18:56, 10 September 2012 (UTC)
 * I moved the background colour to the party cell as a first step, but we probably should do more (e.g., one of the options show here, or something similar). Frietjes (talk) 19:49, 10 September 2012 (UTC)
 * The former looks good to me. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 20:23, 10 September 2012 (UTC)

Subsequent occurences should not be wikilinked
This template should be adjusted such that only the first occurence of a term is wikilinked. Currently, if two National terms are listed, both occurences of "National" are wikilinked. — Hugh (talk) 23:44, 25 April 2018 (UTC)
 * I concur. I don’t have the skills to implement that and would appreciate changes from an editor who knows how to go about this.  Schwede 66  16:42, 26 April 2018 (UTC)

Changing from text on color (shading) to two cell style
Continuing from the above, the election tables on en.wiki tend to have moved to a two cell style - one for the color and one for the name. This way the color used does not have any possible accessibility issues as there is nothing rendered above it. This also makes the party color usage consistent - a user viewing a table like that used at New Zealand Labour Party, which uses a red color for the party, currently would be confused by the pink color used by this template. This change makes it consistent as it uses the same values.


 * }


 * }

The table on the left is the current version and the table on the right is the /sandbox one. Gonnym (talk) 10:47, 30 December 2021 (UTC)
 * , that’s nice and clean. I like it.  Schwede 66  15:31, 30 December 2021 (UTC)
 * , you were the last who edited the template. There are two issues. The minor issue is that some of the columns should now be made wider to accommodate the larger font ("Years" and "Electorate"). The bigger issue is that in the last line of a table, something creates a line break after the entry for "Party"; it can be seen in the two tables under "Accessibility problems" above. Could you please have a look what causes this? Much appreciated. And a happy new year!  Schwede 66  03:16, 2 January 2022 (UTC)
 * Regarding the size, since "wider" is subjective, you could either let me know what size exactly you want and I'll do it or just edit it as I'm sure you'll know better how you think it should be. Regarding the line break, I'm not seeing the issue so can you point me to where exactly you see the line break? If you mean the empty column cell to the right of the "Party" cell in the top example, notice that the template there isn't using the /sandbox version. If it isn't that, then point me to where the issue is please so I can fix it. Gonnym (talk) 08:32, 2 January 2022 (UTC)
 * , see, for example, the parlbox at John Karslake Karslake. There's obviously a line break after "Independent", creating a cell with two rows.  Schwede 66  03:45, 4 January 2022 (UTC)
 * Ok, I see this now. However, this was present with earlier versions. Pick an earlier revision and preview John Karslake Karslake with it. I'll see if I can find the issue. Gonnym (talk) 09:23, 4 January 2022 (UTC)
 * Fixed. Gonnym (talk) 09:27, 4 January 2022 (UTC)
 * , excellent – thanks heaps.  Schwede 66  16:58, 4 January 2022 (UTC)
 * If there won't be any comments to this in the next day or so I'll sync with the live version. Gonnym (talk) 18:25, 4 January 2022 (UTC)

The problem I see with the Template:Party color cell is that it also takes over the table format into itself. instead of This forces the editor to remove the table formatting, which IMHO, shouldn't. Is there any other alternative to this? How about Template:Party cell? (Sure, any editor using the will not have any knowledge of this, but still in the long run, I think the template shouldn't.) — DaxServer (talk) 15:50, 5 January 2022 (UTC)


 * Could you explain what issue it causes by doing so? Gonnym (talk) 15:53, 5 January 2022 (UTC)
 * To clarify, there's no issue with the NZ parlbox. I probably should have posted by concern on the Party color cell talk page, and not here. Sorry!!
 * To add what I meant, one should use the template as  without the pipe   at the start of the table cell (required for table formatting) as the template substitutes it; instead of   — DaxServer (talk) 16:05, 5 January 2022 (UTC)
 * Ah ok. Well to be honest, I think I lean more with your opinion on this matter. It just seems "off" to me (though I didn't create it so no idea what was the rational behind that design choise). Anyways, bring it up on that page, I'll support and if there won't be any editors against that change, we can ask a friendly bot operator to help convert any usages. Gonnym (talk) 16:10, 5 January 2022 (UTC)
 * Thanks done Template talk:Party color cell § Propose to drop pipe (|) at the beginning — DaxServer (talk) 16:31, 5 January 2022 (UTC)
 * I've updated the live code with the sandbox changes as it has been a week with no additional comments. Regarding the pipe, when that discussion ends, we can update the template with the additional pipe without any issue. Gonnym (talk) 10:06, 6 January 2022 (UTC)

formatting help please
Grateful if someone can help with the ParlBox on William Crowther (New Zealand politician). It should be three lines, but displays as a rather garbled 2 ... the syntax looks ok and i'm reluctant to change it in case I make it worse. Many thanks! Somej (talk) 10:21, 8 October 2022 (UTC)


 * it for you. It can be a bit buggy.  Schwede 66  10:25, 8 October 2022 (UTC)
 * wow that was fast! Many thanks. Somej (talk) 10:26, 8 October 2022 (UTC)