Template talk:Infobox election

message: With very few exceptions, there is no sitting MP immediately before a by-election: that is why an election is needed. Even at a general election, the parliament is dissolved, therefpre MPs cease to be such. It is not reasonable to state, before an election, that the MP before an election is a person who died some weeks previously.  Suggest rename this field to Previous MP. As an aside, wikilinking MP twice on the same row, in a context where it can be reasonably assumed that the reader knows what that is, seems something of overkill. Kevin McE (talk) 13:43, 13 February 2024 (UTC)
replies: text: I assume this is in relation to Special:Diff/1206896902. I think it's an argument of semantics, and as such I don't really have an opinion on the matter (I mean, really, there isn't much difference between "X was the previous MP" and "Y was the MP before this election"). Primefac (talk) 13:55, 13 February 2024 (UTC)
replies: text: Absolutely it is semantic, there is a difference in meaning inasmuch as "before" carries an implication of "up to the time of", which is absent from "previous". Kevin McE (talk) 10:05, 14 February 2024 (UTC)
thread_title:  MP before election 

message: Hi all, there is currently a discussion at Wikipedia talk:Short description#Proposal to add automatic SDs to Template:Infobox election. As it would involve a potential change to this template, editors are invited to participate in the discussion. Thank you for helping improve WP:Short descriptions on Wikipedia! - - mathmitch7 (talk/contribs) 17:46, 23 February 2024 (UTC)
thread_title:  Proposal for automatically adding short descriptions to this template 

message: Should elections include equal-ranked and truncated ballots when calculating vote shares? For example, should ballots marked A = B > C be included in calculating the vote share for A against B?
*Support - Yes
*Oppose - No
Closed Limelike Curves (talk) 04:04, 11 March 2024 (UTC)
replies: text: Support. The convention in the social choice literature on this topic is very clear: equal-ranked ballots need to be included, because they can affect the outcome of the election. This is particularly important for paired counting methods, because equal-ranking indicates indifference (which dilutes the margin of victory). Even for systems where equal-ranking two candidates does not affect the results, users should know what share of ballots were exhausted or ranked several candidates as tied. It is easy to calculate what the results of the election would have been if equal ranks were excluded, but not vice-versa. Closed Limelike Curves (talk) 04:14, 11 March 2024 (UTC)
replies: text: So, do you just mean we should stick to reporting first preference votes for STV/AV/SV elections? Bondegezou (talk) 06:58, 12 March 2024 (UTC)
replies: text: I'm saying that in every round or matchup, the vote share should be equal to the number of votes for a candidate, divided by the total number of ballots (including those that, in the final round, show no further preferences). This is because those ballots can still affect the outcome under many voting systems. Closed Limelike Curves (talk) 07:12, 12 March 2024 (UTC)
replies: text: I suggest we should follow standard practice by reliable sources, and that these may vary from context to context. , can you show some examples in RS of what you want done? Bondegezou (talk) 12:12, 12 March 2024 (UTC)
replies: text: RS? Closed Limelike Curves (talk) 16:46, 12 March 2024 (UTC)
replies: text: There's not really a standard practice from reliable sources for this, because both numbers are correct; they just measure different things. The only time this causes a problem is when vote totals are inconsistent across infoboxes on Wikipedia, because excluding truncated ballots from some totals but not others leaves the door open for biases and confusion. Closed Limelike Curves (talk) 17:32, 12 March 2024 (UTC)
thread_title:  RFC: Should elections include equal-ranked ballots in calculating vote shares? 

message: I modified the last edit because articles like this one were picking up the unnamed parameters and using them for the flag.  removing these unnamed parameters fix the strange Template:Country data independent at the top, but then left a blank row at the top.  this is because if  is in the template but blank, then the #ifexist check still picks up Template:Country data which is a valid template.  I put the "check for blank" back around this line and now it looks fine in both cases. Frietjes (talk) 15:32, 15 March 2024 (UTC)
replies: text: Talking of strange outputs, can anyone work out why the colour bar of the presidential election section of this infobox is so wide? It isn't an issue on other infoboxes arranged in the same way... Cheers, Number 57 16:41, 15 March 2024 (UTC)
replies: text: Seem to happen when "candidate1" is used, and not when it's "nominee1". --Aréat (talk) 16:57, 15 March 2024 (UTC)

text: Can someone revert to last clean ASAP, strange things are still showing up in i.e. https://en.wikipedia.org/wiki/1976_United_States_presidential_election_in_Nebraska DemocraticLuntz (talk) 18:00, 15 March 2024 (UTC)

text: The code seem to malfunction and data that should not be visible in GUI output seems to be visible and the information does not seem to be contained in designated area, I don't know what has happened perhaps some kind of new regulations imposed on templates can not put up with the actuality in programming scale. Cactus Ronin (talk) 18:03, 15 March 2024 (UTC)

text: The "alliance" parameter outputs "parameter 1 should be a party name." if nothing is entered now. HapHaxion (talk / contribs) 18:06, 15 March 2024 (UTC)
replies: text:  can you fix what broke with your changes? Frietjes (talk) 18:29, 15 March 2024 (UTC)
replies: text:  the blank row is still at the top of 2012 World Bank Group presidential election caused by the bad logic for  being blank and 1918 Portuguese general election still has a large red error saying parameter 1 should be a party name., ... which is coming from Module:Political party get bad input this error was caused by this change which broke another blank input case. Frietjes (talk) 18:42, 15 March 2024 (UTC)
replies: text: I have fixed the big red error with a partial revert of the /shortname template. I added a new test case to show the error. – Jonesey95 (talk) 19:26, 15 March 2024 (UTC)
replies: text:  Jonesey95, that helps.  we still have 2024 Portuguese legislative election linking to "none" which is a disambiguation page, but at least no red errors. Frietjes (talk) 19:33, 15 March 2024 (UTC)

text: @Jonesey95@Frietjes Thanks for adding the test case. I added an additional check for  being blank. --Ahecht (TALKPAGE) 19:59, 15 March 2024 (UTC)
replies: text: Re the test case, do we know why using candidate and nominee do different things to the width of the colour bar? And also what is happening with the previous/next election links (why are they spilling off the edge of the infobox?). Cheers, Number 57 22:49, 15 March 2024 (UTC)

text: Also, can people remember to use the sandbox to test stuff, rather than risk breaking tens of thousands of articles... Number 57 22:51, 15 March 2024 (UTC)
thread_title:  Strange output 

message: Thanks. Cheers! BD2412 T 16:31, 16 April 2024 (UTC)
replies: text: Done. Will now appear as TBD. Also did the same for TBC. These sorts of things can be sorted out at . Cheers, Number 57 16:45, 16 April 2024 (UTC)
replies: text:  Excellent, thanks! BD2412 T 16:54, 16 April 2024 (UTC)
thread_title:  Please fix this so that putting "TBD" in the after party parameter does not link the disambiguation page, [[TBD]] 

message: I would like to propose that we add support to the template for alternative labels for the party field. Especially in elections to non-governmental bodies, it is common for there to be party-like entities that aren't referred to with the word "party".
For example, in elections to the General Synod of the Church of Sweden (see, e.g., 2021), they use the term "nominating group" because, while some of the nominating groups are political parties (the same parties as in Swedish parliamentary elections), other nominating groups are not. Or, for another example, in many trade unions, candidates run as part of a "slate" (see, e.g., 2021 Teamsters election). Although slates are distinct from parties in that they don't typically exist over more than one electoral cycle, they serve the same function in the context of that election.
It is, of course, already possible to get a custom label using auxiliary rows (1blank, 1data1); however, this would put the name of the party-like entity at the bottom of all of the statistical data despite it being the first thing our readers are looking for in most cases. And this would be especially impractical in an article like 2021 Swedish Church Assembly elections as there are no leaders listed.
I have added the necessary code to the sandbox. An example of what this would look like can be seen at . Graham (talk) 05:00, 18 May 2024 (UTC)
replies: text: Looking at the past couple archives of this talk page, new topics that don't get a reply within the first day or two are never replied to, so I'll go ahead and add . Graham (talk) 05:25, 21 May 2024 (UTC)
replies: text: Done, although it needed a slight tweak to default to simply 'Party' if nothing was entered (in the testcases it could be seen that all the examples without the new parameter were broken). Number 57 21:00, 21 May 2024 (UTC)
replies: text: I added a necessary test case with an empty  and tweaked the code just a bit. I think it is all working now. – Jonesey95 (talk) 22:02, 21 May 2024 (UTC)
thread_title:  Alternative party label 

message: Right now IRV infoboxes like 2009 Burlington, Vermont mayoral election are kind of hacked-together. It’d be nice to have a template to reproduce that with fewer manual inputs! (cc @Number 57) –Sincerely, A Lime 17:55, 18 May 2024 (UTC)
thread_title:  Request for IRV infobox