Template talk:Infobox election
Template:Infobox election is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
This is the talk page for discussing improvements to the Infobox election template. |
|
Archives: 1, 2, 3, 4, 5, 6, 7, 8, 9Auto-archiving period: 4 months |
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||
|
Merging Parametres - "previous_election" and "previous_year", and "next_election" and "next_year"
[edit]@Number 57, Impru20, Vacant0, Siglæ, Rowei99, Μαρκος Δ, Checco, Scia Della Cometa, Yakme, Vacant0, Braganza, Kawnhr, Chuborno, Davide King, Nick.mon, Erinthecute, HapHaxion, Helper201, Vif12vf, PLATEL, Morgan695, Tyrosian, and Elg3a-1: I believe it would be best to merge them, akin to how TILE has them merged. What do others think? ValenciaThunderbolt (talk) 16:57, 21 July 2024 (UTC)
- If this is possible it would be great! Closed Limelike Curves (talk) 18:21, 22 July 2024 (UTC)
- @Closed Limelike Curves: It's pretty much a no-brainer, and I'm surprised it wasn't implemented as soon as TILE became a thing. ValenciaThunderbolt (talk) 11:10, 25 July 2024 (UTC)
Lots of space
[edit]Kia ora, something changed and now a bunch of these have lots of extra white space for some reason? Like 1978 Gilbertese Chief Minister election TheLoyalOrder (talk) 00:21, 3 August 2024 (UTC)
- I fixed a typo in some other routine edits today introduced in June. Izno (talk) 00:46, 3 August 2024 (UTC)
- the problem appears to have been fixed TheLoyalOrder (talk) 01:04, 3 August 2024 (UTC)
Leaders seat/Leader since only to be mentioned if included in text?
[edit]Should this still be a requirement of the infobox's usage? Especially considering the longstanding usage of it in United Kingdom and Australian general/federal elections, none (or very few) of which include the seat in the plain text. It feels like an unnecessary caveat to add, and a newer addition to the documentation relatively speaking as well. I personally propose officially allowing the infobox to include the "leaders_seat" and "leader_since" parameters without the info being included in the plain text of the body, which seems to be unofficially allowed on dozens of articles already.
Essentially, codify that leader's seat and leader since should be permitted to be included without explicitly being listed in the article's text, as is already de facto permitted in dozens of articles about UK and Australian elections, Support? Oppose? why/why not? – GlowstoneUnknown (Talk) 12:09, 4 August 2024 (UTC)
- It's an MOS:INFOBOXPURPOSE violation to include it. The inclusion predates the RfC that ended with an outcome for them not to be included, and just needs putting into practice. Number 57 20:46, 4 August 2024 (UTC)
RfC projected electoral votes USA
[edit]There is an RfC here regarding when to add projected electoral votes to the infobox for U.S. presidential elections. Prcc27 (talk) 07:55, 10 August 2024 (UTC)
Edit request 24 August 2024
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Description of suggested change: Add link argument to custom flag images
Diff:
− | {{#invoke: | + | {{#invoke:InfoboxImage|InfoboxImage|image={{{flag_image|}}}|size=50px|alt=|link={{{flag_link}}}}}<hr /> |
DimensionalFusion (talk) 13:40, 24 August 2024 (UTC)
- I believe (but am not 100% sure) that the reason
|link=
is disabled is because any links should be in the|caption=
for the image. Primefac (talk) 20:27, 25 August 2024 (UTC)- If this is true, then when flag_image is used it shouldn't link to the flag file when clicked. Maybe I'll look into that too DimensionalFusion (talk) 18:47, 26 August 2024 (UTC)
- @DimensionalFusion I think the idea is that since the flag is a purely decorative image, adding a link to the flag file would cause screen readers to unnecessarily read out the file name. --Ahecht (TALK
PAGE) 21:26, 16 September 2024 (UTC)
- @DimensionalFusion I think the idea is that since the flag is a purely decorative image, adding a link to the flag file would cause screen readers to unnecessarily read out the file name. --Ahecht (TALK
- If this is true, then when flag_image is used it shouldn't link to the flag file when clicked. Maybe I'll look into that too DimensionalFusion (talk) 18:47, 26 August 2024 (UTC)
- Not done for now: please establish a consensus for this alteration before using the
{{Edit template-protected}}
template. --Ahecht (TALK
PAGE) 14:45, 27 September 2024 (UTC)
How to use the poll1 parameter?
[edit]I was trying to add polls to the Next United Kingdom general election box and cannot work out how to do so, so I had to use the blank parameter instead. Are there any examples of the poll fields in use, so I can find what I'm missing about how to do it? Chessrat (talk, contributions) 21:58, 5 September 2024 (UTC)
- I don't think I've ever seen that function used. However, it also strikes me as something that would be a very bad idea to include, given the frequency with which it would need to be updated and the potential for arguments over what is the latest poll, for example, if two are published on the same day or the latest one is disputed. I think it would probably be best to delete this from the infobox given it appears to be used very infrequently, if at all. Number 57 00:57, 6 September 2024 (UTC)
- I second this. Vacant0 (talk • contribs) 16:53, 6 September 2024 (UTC)
- Support deleting this parameter as well. – Closed Limelike Curves (talk) 21:09, 29 September 2024 (UTC)
Question
[edit]How am I able to display an alternative name for a party in the Infobox? I want to link the Reform Party (Northern Mariana Islands) without displaying it as the full name. Rather, I want to link it as Reform. I've always struggled with the parameter and I've never fully figured out what to do to resolve this. Ornithoptera (talk) 05:58, 19 September 2024 (UTC)
- I've added the party to Module:Political party/R. It should now display as you've wished. Vacant0 (talk • contribs) 09:43, 19 September 2024 (UTC)
Adverse interactions with dark mode and Template:Composition bar compact
[edit]This template seems to break compact composition bars in dark mode. Allan Nonymous (talk) 13:50, 19 September 2024 (UTC)
Valid vote parameter
[edit]Ideally would be nice to have parameters like valid_vote
and spoiled_vote
so we can calculate percentages and turnout automatically, while enforcing standard guidelines (e.g. including spoiled ballots in turnout, but not percentages). – Closed Limelike Curves (talk) 21:21, 29 September 2024 (UTC)
Help with template
[edit]Hello. I created a new election template (Template:2024 United States presidential election infobox). Can anyone help me add the view, talk, and edit perimeter on the infobox? Prcc27 (talk) 22:21, 14 October 2024 (UTC)
- Why would you want this as a template? Infoboxes should be coded directly onto the article they appear on. Number 57 00:02, 15 October 2024 (UTC)
- For two reasons: a) the article is under WP:1RR which could make it harder to enforce consensus and maintain the infobox if each user only gets 1 revert for the entire article on Election Night, and b) I was thinking about possibly adding the infobox to other subarticle(s). But if users disagree with this, I will yield. Prcc27 (talk) 05:53, 15 October 2024 (UTC)
- See {{2024 United States presidential election infobox/sandbox}} and the testcases page. – Jonesey95 (talk) 20:23, 15 October 2024 (UTC)
- If the article is under 1RR, the template would also be under 1RR IMO. I can't see this is a valid reason for creating a template. The infobox can also be transcluded to other articles from the main article, which is better than having it in template space (one of the reasons the vast majority of election results templates were deleted was because template space is more prone to vandalism due to its relative lack of watchers). Number 57 20:29, 15 October 2024 (UTC)
- 1 revert for the article and 1 revert for the infobox is better than 1 revert for both only. Prcc27 (talk) 23:28, 15 October 2024 (UTC)
- It seems reasonable to work out any technical issues in a temporary place, then move it to the article, when it would, correctly, come under 1RR. It might also be worth mentioning that 1RR doesn't, as far as I know, include self reverts. All the best: Rich Farmbrough 13:12, 17 October 2024 (UTC).
- I wonder why the templates' protection status wasn't just elevated. All the best: Rich Farmbrough 13:13, 17 October 2024 (UTC).
- If it's just a matter of 1RR, there isn't a protection that can be added. If the templates does need to be protected to match the article, though, please let me know. Primefac (talk) 15:33, 17 October 2024 (UTC)
- Thanks. I was referring to "(one of the reasons the vast majority of election results templates were deleted was because template space is more prone to vandalism due to its relative lack of watchers)". All the best: Rich Farmbrough 16:03, 17 October 2024 (UTC).
- Thanks. I was referring to "(one of the reasons the vast majority of election results templates were deleted was because template space is more prone to vandalism due to its relative lack of watchers)". All the best: Rich Farmbrough 16:03, 17 October 2024 (UTC).
- If it's just a matter of 1RR, there isn't a protection that can be added. If the templates does need to be protected to match the article, though, please let me know. Primefac (talk) 15:33, 17 October 2024 (UTC)
- If the article is under 1RR, the template would also be under 1RR IMO. I can't see this is a valid reason for creating a template. The infobox can also be transcluded to other articles from the main article, which is better than having it in template space (one of the reasons the vast majority of election results templates were deleted was because template space is more prone to vandalism due to its relative lack of watchers). Number 57 20:29, 15 October 2024 (UTC)
- See {{2024 United States presidential election infobox/sandbox}} and the testcases page. – Jonesey95 (talk) 20:23, 15 October 2024 (UTC)
- For two reasons: a) the article is under WP:1RR which could make it harder to enforce consensus and maintain the infobox if each user only gets 1 revert for the entire article on Election Night, and b) I was thinking about possibly adding the infobox to other subarticle(s). But if users disagree with this, I will yield. Prcc27 (talk) 05:53, 15 October 2024 (UTC)
Elected
[edit]We have two headers, <Officeholder> before election and Elected <Officeholder>. Because there is only one field we are using the capitalised version. In August I put in a fix for mayors Mayor before election and Elected mayor. I don't want to try to capture all possible titles that should be lowercased, or the lesser number that shouldn't (though that might be doable). Nor do I want to add to complexity by having a separate field or flag. What I propose therefore is: <Officeholder> before election and <Officeholder> elected. All the best: Rich Farmbrough 13:19, 17 October 2024 (UTC).
- IMO this would be better solved by rewording the second one as <Officeholder> after election, primarily because this infobox is also used for elections in which the officeholder in question is not elected (e.g. many parliamentary elections, where a Prime Minister or Speaker is the officeholder listed). Number 57 00:51, 18 October 2024 (UTC)
- I considered something similar to this, however in the US Presidential elections (and probably a significant number of others) the president elect (an alternative but slightly obscure term) is not the president in fact until some time later.
- Prime ministers are indeed often (usually?) appointed, at least technically, by the head of state. But unless there is an election "after election" makes no sense. All the best: Rich Farmbrough 10:06, 18 October 2024 (UTC).
- I'm not sure what about what I proposed would make no sense. What I would expect to see (and what we have) in the bottom right of the infobox for the 2024 United Kingdom general election is "Prime Minister after election: Keir Starmer". Are you suggesting this is nonsensical? Number 57 19:41, 18 October 2024 (UTC)
- It looks good, and although there are some niceties[1] it's probably fine for the UK.
- Let us suppose, though, that Bart Simpson wins the US presidential election in November. We would then have "President after election: Bart Simpson" But Joe Biden would be the President of the United States after the election until some time in early January.
- All the best: Rich Farmbrough 22:24, 18 October 2024 (UTC).
- I'm not sure what about what I proposed would make no sense. What I would expect to see (and what we have) in the bottom right of the infobox for the 2024 United Kingdom general election is "Prime Minister after election: Keir Starmer". Are you suggesting this is nonsensical? Number 57 19:41, 18 October 2024 (UTC)
References
- ^ The UK General elections are not between the party leaders, and in the case of a hung parliament may require several candidates in sequence to be invited to form a government by the monarch. The monarch invites the person most likely to command the confidence of the house to form a government. In 1974 this was Edward Heath, although Labour had more seats.
college_voted parameter needs fixing
[edit]Could someone please fix the U.S. college_voted infobox so that the infobox will not say “to be determined” in the “elected president” field? We want the article to have this field blank, but we need the college_voted field so that “projected electoral vote” will display on Election Night instead of “electoral vote”. We have already had two users that oppose the “to be determined” field, and I was reverted when updating the parameter solely because of this issue. Prcc27 (talk) 03:56, 27 October 2024 (UTC)
- After playing around on my sandbox, I figured out how to replace the TBD footnote with an underscore (which is a huge improvement), but still have not figured out how to have the “elected president” field completely blank. I hope someone will be able to help me. Thanks. Prcc27 (talk) 04:26, 27 October 2024 (UTC)
Default white background for map for better legibility in dark mode
[edit]Would it be possible to add a white background to the map so dark mode users can better read text? For example, at 2024 United States presidential election if the text does not fit in the state (because the state is too small), then it ends up on the dark background and the black text is then pretty difficult to read. I imagine this is a problem for plenty of other elections as well. Slapping a white background behind the map would be a simple solution. Arcturus95 (talk) 20:00, 5 November 2024 (UTC)
- Looks like switching to an SVG in this edit for my example article effectively did what I was asking. But regardless, the default should always be white. Arcturus95 (talk) 02:58, 6 November 2024 (UTC)
Extra cell in nominees row on mobile
[edit]Compare the presidential election example on desktop with mobile; in the latter, there is an extra cell in the Nominee row with a bottom border visible. This can be seen on, for example, every US presidential election article. Annoyedhumanoid (talk) 17:47, 9 November 2024 (UTC)