Template talk:Infobox election/Archive 9

Edit request 19 January 2023 (Use with {{party color}})

By replacing the border-bottom: 6px solid #{{{color1}}} lines of code for colour handling with border-bottom: 6px solid #{{#sub:{{{color1}}}|-6}}, the template can now be used with the {{party color}} template, by allowing values starting with #.

Kingdom of Baustralia (talk) 01:24, 19 January 2023 (UTC)

  Not done for now: @Kingdom of Baustralia Why does this change need to occur. If the parameter |party1= is used, it will automatically get the value of {{Party color}}. Along with this, why only change |color1= when there is also a |color2= and |color3=? Please provide some examples of when this would be useful as well as make your requested changes to the templates's sandbox first; see WP:TESTCASES. Terasail[✉️] 07:01, 19 January 2023 (UTC)
@Terasail: This is a valid request as sometimes a party uses a different colour to its usual one for an election, or changed its colour, so another colour (from the party colours module) needs to be used. I agree this change is needed and would be helpful. An example of where it would be used is 2019 Austrian legislative election, where the Austrian People's Party did not use their usual black colour and it would be useful to call it via {{party color|Austrian People's Party (2017)}} rather than it being hardcoded as a colour. Cheers, Number 57 19:30, 19 January 2023 (UTC)
  Done @Kingdom of Baustralia @Number 57: I used gsub so that it will also work with 3 character hex codes (#FFF). Let me know if there is anything wrong with it but you should be able to add both templates, and hex codes with # as the parameter. I checked the testcases and didn't notice any difference apart from #3 which was showing the correct change. Terasail[✉️] 21:48, 19 January 2023 (UTC)
@Terasail: It doesn't seem to be working properly. I added the party colour template at the Austrian election article. It should be showing colour #63C3D0 (which is what is in the module), but it appears to be #597fcd... Number 57 22:30, 19 January 2023 (UTC)
Ah I see, let me look into it. Terasail[✉️] 22:36, 19 January 2023 (UTC)
I am going to reopen the request incase anyone else wants to do this... I can't get this to work with Module:String or Module:Ustring. They have a wondeful habbit of adding a 35 ('#' character number) on the front of the output which ruins the color. I must be doing something stupid but I just can't see what, its been a hour and I got nowhere... Terasail[✉️] 23:21, 19 January 2023 (UTC)
I had a go at it. It will not work for the case where #, or # wrapped in nowiki tags, is used before the color, but it appears to work for {{party color}}. – Jonesey95 (talk) 23:41, 19 January 2023 (UTC)
@Jonesey95: It still doesn't work at the Austrian article (see here), unless you've only done it in the sandbox? Number 57 23:50, 19 January 2023 (UTC)
It's only in the sandbox. I was hoping that another pair of eyes would look at it before I broke a bunch of articles. If you preview that Austrian article using {{Infobox election/sandbox}}, you should see a color under Herr Kurz. – Jonesey95 (talk) 23:57, 19 January 2023 (UTC)
@Jonesey95: Yep, looks like it works to me - thanks! Number 57 00:24, 20 January 2023 (UTC)
Thanks for that Jonesey. I was close looking at what you did, but just couldn't reach the finish line... Terasail[✉️] 00:44, 20 January 2023 (UTC)
  DoneJonesey95 (talk) 00:58, 20 January 2023 (UTC)

Template-protected edit request on 8 February 2023

Please add "leaders_seat" as a parameter for parliamentary elections. This is necessary for elections in many countries (e.g Australia). I do recall it formerly existing, but it for some reason disappeared. Can someone please add it back as soon as possible? It should go under the "party" parameter and the label should say "Leader's seat". Thanks! Thiscouldbeauser (talk) 07:07, 8 February 2023 (UTC)

Okay, I've worked out that @Number 57: removed it. Can you please add it back? I think it's necessary for certain countries to include this, especially because due to this articles such as 2023 New South Wales state election and 2024 Queensland state election now have to include it as a blank label, thus putting it at the bottom of the infobox (which looks odd). Thiscouldbeauser (talk) 07:10, 8 February 2023 (UTC)

Another reason I ask for this is because "home_state" is a parameter and is used for American elections. Thiscouldbeauser (talk) 07:11, 8 February 2023 (UTC)

There is an ongoing discussion on these parameters at WT:E&R. They were initially removed after discussion at that page. Number 57 09:01, 8 February 2023 (UTC)
home_state parameter is important for American elections (presidential only), because the constitution mandates that presidential electors from one state cannot cast their electoral votes for persons of the same state in both the presidential and vice-presidential ballot. CX Zoom[he/him] (let's talk • {CX}) 10:58, 8 February 2023 (UTC)

Broken template?

I've noticed that the 'leaders_seats' and 'leader_since' are no longer part of the infobox, leaving a lot of these infobox entries orphaned across quite a lot election pages; is the template broken? BitterGiant (talk) 16:00, 23 February 2023 (UTC)

The discussion is happening at this link. – Jonesey95 (talk) 19:01, 23 February 2023 (UTC)

Swing

The parameter called "Swing" actually describes vote change. The two may be interchangeable in some territories but they are definitely not in others. See, for example, Swing (United Kingdom). I suggest the label be changed to the more literally descriptive "Vote change" to avoid ambiguity. Utilisateur19911 (talk) 07:46, 1 April 2023 (UTC)

3x4.svg

This template is now showing a weird image "File:3x4.svg" when only one candidate is listed in the infobox (such as in unopposed elections). Anyone know why this is? Kiwichris (talk) 03:17, 1 April 2023 (UTC)

Where are you seeing this? This could be because I recently requested that when a bot removes images from the infobox as NFCC violations (which happens regularly), they are replaced with 3x4.svg to avoid messing up the infobox (if no image is present for , it can compress that column to the widest word used). I'm guessing this might have happened on an article where there was only one image in the infobox? Number 57 15:05, 1 April 2023 (UTC)
An example would be this page: 16th National Congress of the Chinese Communist Party. Kiwichris (talk) 23:57, 1 April 2023 (UTC)
Ah, the bot owner a change to the infobox rather than their bot code, and this is what caused the problem. I've undone the changes. Number 57 12:01, 2 April 2023 (UTC)

RFC on the infobox of the 2018–2022 Italian general elections

An RFC about the infobox of the two general elections in Italy, is being held. You are all invited to participate. --Scia Della Cometa (talk) 08:38, 8 April 2023 (UTC)

RFC: outgoing and elected MPs in the Infobox legislative election

A Request for comments is being held, which concerns the inclusion of the lists about outgoing and elected MPs in the {{Infobox legislative election}}. Your input would be appreciated. --Scia Della Cometa (talk) 13:28, 6 May 2023 (UTC)

Template-protected edit request on 27 July 2023

"This infobox describes a presidential, primary, legislative or parliamentary elections." Change "elections" to "election" Needforspeed888 (talk) 20:54, 27 July 2023 (UTC)

  DoneJonesey95 (talk) 21:22, 27 July 2023 (UTC)

Edit request

Add a wikilink for the word "Swing" to Swing (politics). --MtPenguinMonster (talk) 14:36, 18 September 2023 (UTC)

I am not strictly opposed to this, but it would result in that link showing up multiple times in the same infobox (see the UK example). Is that a desired outcome? Primefac (talk) 07:50, 19 September 2023 (UTC)

Council Infobox

In cases where it is used for an individual council election, should we use the overall party leader or the leader of that councils party group TheHaloVeteran2 (talk) 16:48, 15 November 2023 (UTC)

IMO it should be the leader of the party for the election in question, so it would be the local leader. Cheers, Number 57 20:26, 15 November 2023 (UTC)

Template-protected edit request on 22 November 2023

Please add new parameters like Party/Alliance. Happyjit Singh (talk) 06:19, 22 November 2023 (UTC)

  Not done Alliances are between parties. There are seats where alliance members have friendly fight. All the rules and guidelines laid for election articles ask us to use parties only. For example - MOS:INDELECT states Only those parties that are covered by Reliable Media as a major contender for winning that election are listed in the infobox. It says parties not alliances. If any admin or senior editor disagrees, then I shall be happy to be corrected. ShaanSenguptaTalk 09:28, 22 November 2023 (UTC)

What is the difference between nominee and candidate?

I occasionally see infoboxes being changed from nominee to candidate and vice versa, and there seems no hard-and-fast rules about which term is appropriate. Are they just different terms for the same thing, or is there actually a difference? If the latter, can we create a clear definition of when to use each? Number 57 22:26, 19 January 2024 (UTC)

This usage may vary by country, but in US presidential elections, there are two major parties, and until the party's convention a few months before the election, there are multiple candidates in each party. At the convention, the party chooses a nominee, at which point each party has only one candidate for president. See United States presidential nominating convention for excruciating details. – Jonesey95 (talk) 23:07, 19 January 2024 (UTC)

Candidate image size when viewing election pages on mobile

I have noticed that when viewing the election infobox on mobile, candidate image sizes are always of unequal size (which seems like a bug to me). It seems like whichever candiate is represented by a blue colour gets a larger image Can anyone replicate it?

screenshot of the infobox from this page - https://i.ibb.co/8cnWhTc/IMG-0622.png - and another from the infobox from 2024 London mayoral election (where I noticed the issue) - https://i.ibb.co/hHbb86h/IMG-0623.png Oliverwinton (talk) 14:03, 20 January 2024 (UTC)

@Oliverwinton: This has been a problem for a while, but I am not sure the infobox code is the problem (as it sets consistent sizes). It might be worth reporting it as a bug via the route detailed at WP:BUGS. Number 57 14:06, 20 January 2024 (UTC)

Proposed change to the before/after section

I would like to propose we change the final section of the infobox so that instead of the defaults being "[Title] before election" and "Elected [title]", the default is "[Title] before election" and "[Title] after election".

The default of "Elected [title]" for the post-election situation doesn't work for most parliamentary elections as the Prime Minister or whatever other postholder is mentioned is not generally elected to that position. This results in a huge number of infoboxes having to correct it by using the "posttitle" parameter. Defaulting to "[Title] before election" and "[Title] after election" would be neutral and correct, and avoid having to add a correcting parameter to many articles (or edits like this where the entire section gets removed because the wording is wrong). Cheers, Number 57 20:24, 23 January 2024 (UTC)

Agree as a straightforward improvement. Ralbegen (talk) 20:52, 23 January 2024 (UTC)
not really neccesary imo WeaponizingArchitecture | scream at me 04:49, 24 January 2024 (UTC)
Good idea, Number 57. Bondegezou (talk) 10:36, 24 January 2024 (UTC)