Jump to content

Template talk:Infobox political party

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Edit request to complete TfD nomination

[edit]

Template:Infobox political party has been listed at Templates for discussion (nomination), but it was protected, so it could not be tagged. Please add:

{{subst:tfm|help=off|type=sidebar|1=Infobox US political party}}

to the top of the page to complete the nomination. Thank you. A1Cafel (talk) 07:27, 25 December 2024 (UTC)[reply]

 Done * Pppery * it has begun... 18:12, 25 December 2024 (UTC)[reply]

Edit request to implement TfD consensus

[edit]

Recently, a TfD was completed regarding this template which resulted in a general consensus to edit part of this template. The edits were made, but they were removed because they were breaking the template on some pages.

I believe I have fixed the issue (which, to be honest, I could not replicate in my sandbox), and I was wondering if someone could implement the following changes:

  1. Please replace the |abovestyle and |above sections with this:
    | abovestyle = font-size: 125%; {{#if:{{{background|}}}|background:{{{colorcode}}}; color:{{{textcolorcode|}}};|}}
    | above = <div style="padding-top:0.3em; padding-bottom:0.3em; {{#if:{{{colorcode|}}}|border-top:2px solid {{{colorcode}}}; border-bottom:2px solid {{{colorcode}}};}} line-height: 1;"><div class="fn org">{{if empty|{{{name|}}}|{{PAGENAMEBASE}}}}</div> {{#if:{{{native_name|}}} |<div style="font-size: 0.8em; padding-top:0.3em;" class="nickname" {{#if:{{{native_name_lang|}}}|lang="{{{native_name_lang}}}"}}>{{{native_name}}}</div>}}</div>
  2. Please add background and textcolorcode to the parameter list at the end of the template.

Thanks! Please let me know if there are any issues. RiverMan18 (talk) 21:43, 3 February 2025 (UTC)[reply]

Not done for now: editor RiverMan18, this has been [sandboxed] – looking at the [testcases] page, in "Test 2" the red line below the name and native name is missing. The new parameters are used in "test 3". Is all this what you want and expect? Test 2 looks odd now. P.I. Ellsworth , ed. put'er there 03:31, 4 February 2025 (UTC)[reply]
@Paine Ellsworth I think I fixed it in the sandbox (it was a missing space). This explains the problem that was reported when the change was originally implemented—thank you (I’m not sure why it didn’t show up in my sandbox—I might have used a different code).
Thank you. RiverMan18 (talk) 13:57, 4 February 2025 (UTC)[reply]
My pleasure, and  completed. P.I. Ellsworth , ed. put'er there 15:38, 4 February 2025 (UTC)[reply]
Ok—thank you! RiverMan18 (talk) 15:39, 4 February 2025 (UTC)[reply]
A colored background, makes it more difficult to read the name of the political party. GoodDay (talk) 21:04, 4 February 2025 (UTC)[reply]
This code also appears to have at least two problems: I think {{#if:{{{background|}}}|background:{{{colorcode}}} should be {{#if:{{{background|}}}|background:{{{background}}}, and there needs to be a default color for textcolorcode, even if it is just inherit or black, in order to avoid the Linter "background color without color" error. I could be reading the code wrong, but I'm pretty sure both changes need to be made. – Jonesey95 (talk) 01:17, 6 February 2025 (UTC)[reply]
I agree with you on the textcolorcode thing, but I’m not sure about the background thing—the current code sets the colorcode value as the background if there is one, which results in people not having to put the party color in twice. Right now, background, if it has a value, just enables the background.
I’d be ok with the background change—it would just be more inconvenient. RiverMan18 (talk) 01:33, 6 February 2025 (UTC)[reply]
I agree that the new |textcolorcode= parameter needs the black text default. As for changing the |background= parameter, I'm not sure I agree. The |colorcode= parameter already exists and is the political party's color. Right now all that's needed is |background=yes or even |background=y. Changing it from colorcode would mean having to enter the party's color again – I think unnecessarily. P.I. Ellsworth , ed. put'er there 02:41, 6 February 2025 (UTC)[reply]
The |textcolorcode= parameter can be used to make the name of the political party easy to read. Just use a highly contrasting color, like white text on black or red. P.I. Ellsworth , ed. put'er there 02:41, 6 February 2025 (UTC)[reply]
Please see Test case 5, the output of which includes: <th colspan="2" class="infobox-above" style="font-size: 125%; background:{{{colorcode}}}; color:black;">, which doesn't seem valid to me. I think we might need to call a plumber for a pipe. Also see test 6 for an accessibility concern. We might need to check for acceptable contrast. – Jonesey95 (talk) 06:05, 6 February 2025 (UTC)[reply]
Looks like #5 comes out that way due to no |colorcode= parameter. In #6, a |textcolorcode=yellow arg is added for textual contrast. I can see where all this could in some cases lead to concerns about accessibility. P.I. Ellsworth , ed. put'er there 07:19, 6 February 2025 (UTC)[reply]