Template talk:Infobox legislative election/Archive 1

Archive 1

Moving forward

So, how can we make this template suitable for general multi-party-success elections, rather than country specific? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:23, 2 February 2013 (UTC)

I have nominated this template for deletion; please see Wikipedia:Templates for discussion/Log/2015 May 7#Template:Infobox Israeli Election. Alakzi (talk) 21:28, 7 May 2015 (UTC)

Wording of next postholder

A minor thing, but I'd suggest "Subsequent Prime Minister" at the bottom rather than "Elected Prime Minister" as PMs are (in most systems) not directly elected. Bondegezou (talk) 15:09, 23 April 2015 (UTC)

Good point. I've made the change. Number 57 15:39, 23 April 2015 (UTC)

Recent changes

@Alakzi: I don't think your changes were entirely an improvement on the original, but I wasn't sure how to revert individual ones. I have put your version in the sandbox, so the testcases page still shows both. The things that I don't think helped were:

  • Bolding the name of every party - why is this necessary?
  • Taking away the darker shading for the column headers (Party, leader etc) – IMO this makes the table less clear.
  • Making it narrower: "Prime Minister before election" is now split over two rows instead of one, adding unnecessary length to the infobox. Same goes for the note about the full results
  • Putting the up and down arrows for seats changes on the right hand side of the numbers - somehow this seems counterintuitive

Putting the heading of the infobox outside it has the potential to look good, but how it's been done leaves the flag looking unnecessarily large. It might be a good idea to just get rid of the flag if this were to be retained. Number 57 23:52, 3 May 2015 (UTC)

Some of these changes were made for conformity with {{Infobox election}}; that includes the title. There's a default style for infoboxes, and it's not toccolours. The reason party names are in bold is that I've redefined the cell in which they're contained as a header cell for semantic correctness. The default style for header cells is bold. I didn't make the infobox narrower; I've increased the font size, as per WP:ACCESS#Text. I put the arrows on the right because the original "no change" icon looked a lot like the minus sign. I'd be OK with putting them back where they were. In reverting these minor design alterations, you've reintroduced a number of glitches and logic errors. Alakzi (talk) 00:06, 4 May 2015 (UTC)
Like I said, I didn't know how to selectively weed out the changes described above from the undoubtedly good rationalisation of the code. If you could demonstrate in the sandbox (which I see you're doing), that would the best place to make visible changes first. Number 57 00:17, 4 May 2015 (UTC)
I've flipped |seat change= and the arrow, put "before" and "election", and "after" and "election" on the same line, and made the party names thin again. In keeping with the look of {{Infobox election}}, are there any other changes you'd like me to make? P.S. Somebody's a Green Party supporter. ;-) Alakzi (talk) 00:23, 4 May 2015 (UTC)
Thanks. The outstanding issues are that "Prime Minister before election" and "This lists parties that won seats. See the complete results below." still break across two rows, rather than fitting in a single row. It would also be good if the background to the column headings (Party, Leader, %) etc was darker (like in the original) to make it clearer that they are the headers.
If you're talking about the figures I put into the original sandbox case, they were based on the Vote for Policies results for England, Scotland and Wales and the latest opinion polls for NI (the VfP website didn't include them at the time I took the data), all weighted against population for the respective countries. Amazing what the difference is between that people want and what people vote for; the largest parties in both England and NI apparently have the least popular policies. God knows what's going to happen next week :s Number 57 00:31, 4 May 2015 (UTC)
The note's split between two lines on the original as well - I'm not sure if that can be helped? Same goes for the "before election" and "after election", now that I've increased the font size. We could make the whole box a little wider, but wide infoboxes isn't to everybody's taste. Ah I see. I remember taking an older version of that survey. Alakzi (talk) 00:49, 4 May 2015 (UTC)
I solved it using nowrap – it doesn't actually seem to have made the infobox wider; I've also ensured party and leader names don't break across rows with the same technique. Are you happy with the current version in the sandbox? My concerns have been addressed, so would be happy for it to be updated. Number 57 10:32, 4 May 2015 (UTC)
I've made some minor adjustments, which should have not altered its rendering. If they're OK with you, I'll publish it. Alakzi (talk) 11:40, 4 May 2015 (UTC)
Looks good to me. Cheers! Number 57 21:34, 4 May 2015 (UTC)

On another note, we should probably merge the Israeli box with this one. Would you dare attempt a histmerge? Alakzi (talk) 22:08, 4 May 2015 (UTC)

Was thinking the same thing, and was planning to do it tomorrow. Not a histmerge, but mentioning it on this page that it was merged in would probably be enough. Number 57 22:28, 4 May 2015 (UTC)

Show current seats for ongoing election

I think it makes sense to have an option for this, as it's how the infobox with pictures is. It could probably use the existing seatsN_before parameter. Øln (talk) 19:33, 5 May 2015 (UTC)

I think it's a good idea. If we could get "Seats won" to switch to "Current seats" and displays the seats_before if ongoing=yes, that could work. Number 57 20:15, 5 May 2015 (UTC)

Suggestions

  • Add colors. There's a mockup at Talk:United Kingdom general election, 2015. I'd prefer though using entire columns instead of little boxes. I'd highly recommend using the existing political party color templates for this purpose.
  • Add parameters for a map. So we'd have use for colors.
  • Remove seat change column. We could safely leave that out to the full results table at the article. The things that matter in the end are vote shares and seats won.
  • Add optional column for "seats after". If this were to become an infobox that would be universally used, it has to be flexible enough for countries that elect "classes" of legislators such as the Japanese House of Councillors and the French and US Senates.
  • Add "seats needed to win" somewhere.
  • Probably have a row for "Others" so people know how many votes were "wasted" on parties that won 0 seats.

Also, I'm quite bothered by the use of the blue color as the table header and of the small font. Could've settled for a darker gray and using regular font size. Getting rid of the seat change column would help in decongesting the table; the new seat color column could be set to 5px. –HTD 14:00, 6 May 2015 (UTC)

I think the seat change column should definitely be kept – it's a major outcome of an election. I agree colours could be added – I see Alakzi has done this (although Alakzi, could you do something about the way it's displayed? At the moment, the colour seems to be in a column that is offset to the left, so isn't inline with the "Party" column. Number 57 15:30, 6 May 2015 (UTC)
OK, I've done the following:
  1. refined |ongoing= - when its value is equal to "yes", the seat change and percent vote columns are hidden, the note that appears underneath the results table is modified to read This lists parties which are projected to win seats., and the election winner cell disappears - as if by magic!
  2. added support for |map=, and its accompanying parameters: map_upright (a size scaling factor); map_alt (WP:ALT); and map_caption.
  3. automated party colours and party short names - simply unlink any |partyX= entry to have the colour bar appear and name changed into its short form.
  4. changed the appearance of the results table to the wikitable standard.
The addition or removal of any columns should probably be given a little more thought. Alakzi (talk) 16:00, 6 May 2015 (UTC)
Could you get the "Seats" column to be title "Current seats" when ongoing=yes? In that case, the infobox will be able to display this, rather than having an empty column prior to elections. Number 57 16:15, 6 May 2015 (UTC)
Good idea - done. Alakzi (talk)

If you guys would use the seat change column, PLEASE use plus and minus instead of those green and red arrows as the former take up less space. –HTD 05:15, 8 May 2015 (UTC)

@Alakzi: Is there any change you could add a function that if seats_before = new, then it displays "New" in the seat change column rather than leaving it blank? Cheers, Number 57 13:40, 8 May 2015 (UTC)
Blank? It should've said "0". Anyway, I've made it so that it displays "New" when |seats_beforeX=0. Alakzi (talk) 14:04, 8 May 2015 (UTC)
@Alakzi: That doesn't work though, as it means parties that only win a seat in their second or third elections are marked as "New" when they're not. As an example, Kach now show up as "New" in Israeli legislative election, 1984, even though they had contested several elections beforehand and failed to win seats. It needs to be a specific "New" function to avoid this. Number 57 14:07, 8 May 2015 (UTC)
OK, done. Alakzi (talk) 14:10, 8 May 2015 (UTC)
Great, thank you! Number 57 14:12, 8 May 2015 (UTC)

Previous election's percentage vote share when |ongoing=yes

At the request of several editors at Talk:Next United Kingdom general election#Party inclusion criteria, I've made it possible to display the vote share of each party at the previous election. However, I'm not entirely comfortable with this, as the table does not make adequate distinction between the current and previous election's results. Thoughts? Alakzi (talk) 15:29, 14 May 2015 (UTC)

I don't think it's a good addition. In the meantime, can I also request the return of the separate seat change column – I think the new version (with a combined column) is pretty unhelpful, as when, for instance, there are double digit seat numbers and large changes, it makes the figures in a combined column quite wide, meaning there is quite a lot of variation in width of data in the column (e.g. Israeli legislative election, 2006).
Can I suggest that now this template is used on a reasonable number of articles, that any major changes like this are discussed first before being implemented? I keep opening articles only to find the infobox layout has changed yet again. Number 57 23:40, 14 May 2015 (UTC)
The columns were combined to allow for the addition of % vote change without making the infobox overly wide. A change you don't like is not - necessarily - a major change. Further, WP:BOLD is a core editing guideline, and any change we don't like, we could revert. Having to deal with everybody's pet peeves, here and elsewhere, and in areas they're barely competent, is also pretty unhelpful, and my patience is slowly but surely beginning to wane. Alakzi (talk) 23:53, 14 May 2015 (UTC)
Getting rid of one of the five columns is clearly a fairly major change; please restore it. And yes, WP:BOLD is a core guideline, but we also fully protect many high use infoboxes and templates to prevent people making undiscussed changes to them. Number 57 23:58, 14 May 2015 (UTC)
Mostly, we protect them against vandals and clueless editors. This infobox still is quite new and sparsely-used, and could be variously refined. I rather doubt the discussion here is going to attract anybody else's attention, so if you'd not like to see it changed, we've hit a dead end. Alakzi (talk) 00:09, 15 May 2015 (UTC)

Photos of departing and elected heads of government parameters

@Number 57, Bondegezou, Øln, and HTD: Would you be OK with the addition of a parameter for a photo of the departing and elected heads of government each, which would appear above or below their names on the bottom of the infobox? Alakzi (talk) 21:45, 16 May 2015 (UTC)

I've made the change in the sandbox to illustrate: scroll to the bottom right. Alakzi (talk) 21:57, 16 May 2015 (UTC)
I think that makes sense, makes the box a bit less bland. Though, they do get a bit buried by being at the bottom. Øln (talk) 22:02, 16 May 2015 (UTC)
Fine with me. Thanks for all your work on the infobox. Bondegezou (talk) 11:09, 17 May 2015 (UTC)
Looks ok to me too. Number 57 16:02, 17 May 2015 (UTC)
It looks like we've got consensus here, so I've made the change. Thanks for the feedback. Alakzi (talk) 20:20, 17 May 2015 (UTC)

party_color and party_name?

The original infobox_election has the ability to define party colours and party names.

party_color = no party_name = no

disables the coding used for applying names and colours.

Should the infobox_legislative_election have this ability as well? Byzantium Purple (talk) 20:10, 23 November 2015 (UTC)

sure, why not? Frietjes (talk) 23:37, 23 November 2015 (UTC)

Electorate population

In other election templates a field is present that allows a value to be included to display the total "electorate_population" as well as the "turnout". Could this field be added to this template? Drchriswilliams (talk) 20:17, 12 April 2016 (UTC)

First elections

For instances where this would be used on the first-ever election in a country (i.e. where there is no previous seats for the +/– function), is it possible to turn that column off? @Izkala: Is this a function you could create? Cheers, Number 57 19:21, 15 May 2016 (UTC)

Now done. I have to say I'm bemused by the backlash against this template. How is it not far more readable and informative than {{Infobox election}} for legislative elections? Izkala (talk) 13:14, 16 May 2016 (UTC)
Great, much appreciated. And I completely agree... Number 57 13:23, 16 May 2016 (UTC)

Add a column for changed vote share?

Is it possible to add a column for a change in percentage of vote share from the last election? Just like the seat change column does for number of seats won? Philip Terry Graham 03:36, 13 July 2016 (UTC)

I'm wondering about this as well. Mélencron (talk) 19:38, 1 May 2017 (UTC)

Flag icon

This template encourages the use of a flag icon that is contrary to the manual of style: see WP:INFOBOXUSE and MOS:FLAG. I've raised this issue in the context of the current UK general election: see discussion at Talk:United_Kingdom_general_election,_2017#Flag. I propose the template is altered to prevent use of a flag icon, or guidance is given to discourage the practice.

WP:INFOBOXUSE says, "Avoid flag icons." (bold in original). MOS:FLAG states: "Generally, flag icons should not be used in infoboxes, even when there is a "country", "nationality" or equivalent field: they are unnecessarily distracting and give undue prominence to one field among many." There's more; I recommend going to read it. There's nothing specifically on election articles, but it does also say, "Beware of political pitfalls, and listen to concerns raised by other editors. Some flags are (sometimes or always) political statements and can associate a person with their political significance, sometimes misleadingly." Election articles are, by their nature, political and flags can be powerful symbols in elections. Bondegezou (talk) 17:28, 21 April 2017 (UTC)

Oppose the change, as per the reasons provided in both Template talk:Infobox election#Flag icon and Talk:United_Kingdom_general_election,_2017#Flag. Impru20 (talk) 18:37, 21 April 2017 (UTC)
There is more discussion at Template talk:Infobox election#Flag icon, so I have responded there. Bondegezou (talk) 12:42, 22 April 2017 (UTC)

Images?

Heb the best recently added functionality to allow images in this infobox. Number 57 has just reverted. Let's discuss this.

It seems to me that the added functionality is useful and it would be good to preserve it in some way, although that doesn't necessarily mean we should mandate its use in all situations. Bondegezou (talk) 09:57, 19 February 2019 (UTC)

No, no, no. The whole point of this infobox was to avoid using party leader images, as they hugely expand its size, rendering it useless as a compact summary. If anyone wants party leader pictures, please use {{Infobox election}} and do not infect this one with them! Number 57 10:04, 19 February 2019 (UTC)
Heb the best's version of this infobox with images and their other new template offer something intermediate between the current two main infoboxes. This infobox with images is much more compact than {{Infobox election}}. I would be happy not to be limited to {{Infobox election}} or the current version of this template. Bondegezou (talk) 10:09, 19 February 2019 (UTC)
Party leader images are completely unacceptable IMO. In the Danish example, the infobox is already about one screen in height. Adding the images would hugely expand this, and render it useless as a compact summary.
Adding leader images for each party will ruin this infobox's purpose, and it will look incredibly crap in cases where we don't have an image for each leader (which will often be the case for historic elections). Number 57 10:14, 19 February 2019 (UTC)
I remember an earlier version of this infobox that did have pictures. (Am I misremembering? I often do...) That had fairly small pictures and worked quite well, I thought.
Ceteris paribus, I'm all for a very compact, picture-less infobox, like the current version of this template. However, I recognise that most editors prefer something bigger and with pictures. This infobox with pictures might be a better compromise than {{Infobox election}}. Bondegezou (talk) 11:06, 19 February 2019 (UTC)
There are images at the bottom for the previous/subsequent Prime Minister - perhaps you were thinking of that? Also, I recall an editor forcing them into the infobox by coding it differently on an article (could have been one of the Dutch articles).
I appreciate your viewpoint, but I think images would completely ruin this infobox as a compact summary. And as well as causing issues with the size, I also don't see what the images would add – parliamentary elections are primarily about parties rather than individuals (and there is already the ability to add an image of the key individual, i.e. outgoing/incoming Prime Minister). Number 57 11:19, 19 February 2019 (UTC)
Note that images is optional. If none are set, then the template would not look any different than it does now. If this cannot use images, then few would use it, which would be a shame, because in many situations it is better that the other one. Just look at the numbers: this is used on 217 pages, where the other one is used on 15342 pages. I would personally prefer an overdimentional bloated infobox with pictures over nice and compact one without any. After all, elections are about electing people, so it is natural to display those people that are being elected. ― Heb the best (talk) 12:03, 19 February 2019 (UTC)
If the functionality is there, then it will start being used, and I can forsee random images being added but not others. It will end up with a horrible mishmash of articles using them or not, and articles with a mix of images present and absent.
The reason the other infobox is used more is because it's much older and established and many editors are resistant to change, not because of the lack of images.
These elections are indeed about electing people, but it's usually hundreds of them rather than a single person, and it's not practical to have (e.g.) 650 pictures in a UK election infobox. Number 57 12:23, 19 February 2019 (UTC)

Source-parameter

This template should have a source-parameter, so citations are possible. This is especially relevant for elections not yet held, as they have no result-section to link to. Also, when one puts in footnotes at the names, they fuck up the meta-templates. See this. ― Heb the best (talk) 23:54, 2 May 2019 (UTC)

Citations are possible already; I'm not sure what you were doing, but you could have just cited the source at the end of the text (like this). Adding footnotes to the names would also mess up {{Infobox election}}. Perhaps just don't do it? The ones added on that article don't really seem to be necessary. Number 57 11:26, 3 May 2019 (UTC)

Suggestion

Can someone add "Votes counted" parameter similar to the one in {{Infobox election}}. Thanks. Hddty. (talk) 09:29, 3 May 2019 (UTC)

We had that in originally and it was removed as it made the infobox too wide. Number 57 11:20, 3 May 2019 (UTC)
I don't think that's a problem, looking at 2019 Israeli legislative election, the parameter doesn't affect the infobox wide. Even if this parameter is added, in average {{Infobox election}} is wider than this infobox. Also this parameter is used temporarily, it can be removed when it reached 100%. Hddty. (talk) 04:37, 4 May 2019 (UTC)
Ah, sorry, I misunderstood what you meant. I've added it as "Reporting" rather than "Votes counted" as usually electoral commissions report by the number of polling stations/ballot boxes counted, which is slightly different to number of votes. Number 57 10:42, 4 May 2019 (UTC)

Headings and alternating colors

The use of headings might cause problems for the pattern of alternating the background color between white and light grey. Se 2019 Danish general election - both IA and NQ have a white background. It seems to be caused if the row just prior to the heading are white, as there is no problems at 2011 Danish general election. ― Heb the best (talk) 22:44, 3 June 2019 (UTC)

Alliances

The use of this infobox for the 2019 European Parliament election in Germany led me to think that "Alliance" (in this case, EPP, S&D, etc.) should be included as a category, as it is in the regular infobox. It would also be ideal to have to option of renaming "Leader" as "Lead candidate" (which refer to two different people in European elections), but that's potentially complicated and of secondary importance. Chuborno (talk) 04:36, 5 June 2019 (UTC)

I think adding another column would make the infobox too wide. A more convenient way may be to add the alliance after the party name, e.g. CDU/CSU (EPP) – see this example. I agree with the latter though, and don't think it should be too difficult. Number 57 08:05, 5 June 2019 (UTC)

Opinion Polls

@Bondegezou and Candido:

Opinion polls are hot topics in elections. Whereas the election itself last generally for 1 day, the opinion polls can give speculation for years on how the election might shape up. This is especially applicable for future elections such as the Next United Kingdom general election, where until the result is known, the opinion polls are one of the few main topics to the article.

They can also play a big part once the elections result is known, especially upset elections where the winning party was expected to lose for years. 2019 Australian federal election, 1992 United Kingdom general election and 1948 United States presidential election for example.

As we are aware, infoboxes are used as a summary of the most relevant information in the article. Therefore as opinion polls are very relevant I believe a link to the opinion polls page should be included on the infobox as has been done on other templates Template:Infobox election.

On a practical note, having a link at the top of the infobox makes it easier for readers to navigate to the opinion polls page, rather than having to scroll down sometimes very long articles to get to the link, especially on mobile devices. So a link would make the template more useful.

Look forward to folks thoughts on this. Humongous125 (talk) 11:56, 7 September 2019 (UTC)

I don't think opinion polls belong there. I see that they are important, but so are many other things related to an election. For example divisive topics the campaign is about, important campaign promises, or perhaps why the election was called in the first place (for snap elections). Or primaries before the election, they are really the election for the first many months. Many things are important, and I can't see why opinion polls stands out in such a way, that it should have a link in such a prominent position.
With being said, I acknowledge that Template:Infobox election have opinion polls there, and think this one should follow the other. The discussion about this should really be held on that templates talk page. ― Hebsen(previously Heb the best) (talk) 12:34, 7 September 2019 (UTC)
Infoboxes should follow the manual of style as MOS:INFOBOX. As per there, "Avoid links to sections within the article; the table of contents provides that function." With many elections, opinion polling is just a section in the article, which, as per that guidance, we should not be linking to. More generally, infoboxes are not navboxes: they are meant to "summarize (and not supplant) key facts that appear in the article". They are not intended to gather useful links to other articles. So, as per the Manual of Style, I oppose having a link to opinion polling, be it a section within the same article or a standalone article, in either this or any other election infobox. Bondegezou (talk) 12:44, 7 September 2019 (UTC)
The driving topics, such as why an election is called, should be in the opening paragraph as that cant be summarized in the same way as results or polls. The opening paragraph is in a prominent position so equal to the infobox, this allows all the key information to be at the top of the article. In articles where the polls are just a section and not in a separate page, the opinion poll link at the top of the infobox is not normally used, so the point of being a Navbox and linking to other parts of the same article is void. The point I was making was about the summary of key information (not supplanting anything). If the key points such as opinion polls are ignored from the summary, what is the point of having this form of infobox in future election articles. Note in future election articles there is no summary of campaign, promises, or snap elections (as none of that has happened) so the few substantial facts are the polls, so for the infobox to just summaries the current seats isn't very insightful and therefore not useful to the article. Humongous125 (talk) 13:27, 7 September 2019 (UTC)
It appears to me that the correct approach is is summarize the opinions polls in the lead. A link to an opinion poll sections or page doesn't sum up what the polls are saying. For future articles, if polls are all there is, they would naturally have a prominent position in the article. ― Hebsen(previously Heb the best) (talk) 14:01, 7 September 2019 (UTC)
Hebsen, the problem with the idea of summarising the opinion polls in the lead is how to do it, and do it in a non-WP:SYNTH manner, and keep it usefully up-to-date. I don't, at this time, see a solution to that.
Humongous125, many editors feel we should not have any infobox for a forthcoming election, which solves your concern. As per MOS:INFOBOXPURPOSE, "The less information it contains, the more effectively it serves that purpose". We should not be looking to make ever bigger infoboxes. We should be paring them back to the essentials. Bondegezou (talk) 14:15, 7 September 2019 (UTC)

Hebsen A link is a good means of outlining/summarising a key feature or event in an infobox. For example the Conservatives, we don't write in the infobox 'A party for the centre-right that wins most elections in the UK and was founded in the 1800s' we simply put the link to the conservative party and this alerts the reader that the party are a key component of the article and they have the option to continue reading the article or finding out who the conservatives are. The same applies to the opinion polls. Having the link shows opinion polls are a key part to the lead up to an election and the reader has the option to continue reading or looking at the polls in a separate page.

Bondegezou Taking that quotation absolutely literally, risks losing the spirit of what the guidelines set out. The point of a summary as per MOS:INFOBOXPURPOSE is to give enough info that the reader can understand the key points/features of an article without having to dive into the article, so if theres too little information the infobox is not doing its job. For instance if we take the extreme, all the infobox would say is 'Winner: Conservatives', which would be useless and irrelevant to the article. Its a balance and I think this infobox is below that balance, hence why many editors appear to resist using it. I can understand not adding info such as leaders seat, leader since when etc, but leaving out key points such as opinion polls, which is one of the most key points leading up to a future election page, reduces the infoboxes effectiveness. Humongous125 (talk) 16:20, 7 September 2019 (UTC)

  • Comment I can't see a benefit to adding a link in the infobox. If a reader is at the top of the page of an article like Next United Kingdom general election (where the link would appear in the infobox), they already have a link to the opinion polls section in the contents list. Number 57 16:29, 7 September 2019 (UTC)
Text in the infobox may be a link, but it is there because it conveys something. Your proposal is for purely a link. Do a WP:SIDEBAR if you want a sidebar. Bondegezou (talk) 16:53, 7 September 2019 (UTC)

Add declared progress bar

Like the template for elections should there be a declared feature which shows a progress bar? — Preceding unsigned comment added by Jason594 (talkcontribs) 19:48, 2 March 2020 (UTC)

There is one, but it's just not mentioned in the documentation. You can use the parameters "reporting", "last_update" and "time_zone". Number 57 19:52, 2 March 2020 (UTC)

Thank you for your response — Preceding unsigned comment added by Jason594 (talkcontribs) 04:33, 3 March 2020 (UTC)

Template-protected edit request on 21 December 2020

Please add a module parameter. Thanks! ― Ætoms [talk] 19:51, 21 December 2020 (UTC)

What do you want this added for? Number 57 19:58, 21 December 2020 (UTC)
  Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate. DannyS712 (talk) 12:04, 23 December 2020 (UTC)

Registered?

Shouldn't this template have a "registered" parameter like Infobox election does? --Spaastm (talk) 15:45, 18 January 2021 (UTC)

I don't think it's a particularly useful thing to include personally. I would also support specifying that the turnout row should just be the percentage turnout, not the total number of votes cast, which by itself isn't vital information. Number 57 16:12, 18 January 2021 (UTC)

Minus sign to indicate loss of seats

In viewing the 2021 Salvadoran legislative election, I noticed that the seat difference column uses a hyphen (-) instead of a minus sign (−) to indicate a loss of seats compared to the previous election. I'm hoping that an editor could change that hyphen to a minus sign. I believe the hyphen in question is within the subtemplate Template:Infobox legislative election/row, but I can't say that with certainty. Jay Coop · Talk · Contributions 23:56, 4 March 2021 (UTC)

Happy to be corrected, but I don't think this can be done. The symbol is not defined in the template, it is an output of a maths function which presumably uses a predefined type of dash as a negative symbol. Number 57 00:11, 5 March 2021 (UTC)

Footnotes for the seats parameter

Is there any way to add footnotes for voided results that were later resolved with special elections in a manner similar to what this page does? The template seems to need solely natural numbers in the seats parameter for calculating seats lost or gained and I'm not sure of a different method to achieve that. Tydane (talk) 23:32, 8 September 2021 (UTC)

Using css for alternating row shading

Izno looking at the table code in fr:CinéMagique#Films utilisés, I see the French WP has the "alternance" class. I don't know if this would be useful on a wider scale on this WP, but it seems like we could at the very least eliminate the use of template:Alternating rows table section in this template if we imported this feature as a template style for this infobox? Frietjes (talk) 17:33, 9 September 2021 (UTC)

@Frietjes: Alternating rows (though I'm not personally a fan) should go into TemplateStyles, yes, especially when in the context of a template. Was there a reason I was specifically pinged? :D Izno (talk) 17:46, 9 September 2021 (UTC)
Izno you seem to be the one adding template styles to all the infoboxes, so I figured you were the person who could do it for this infobox (and eliminate the use of template:Alternating rows table section in this template). Frietjes (talk) 17:48, 9 September 2021 (UTC)
Ah, ok. I've just been doing it for MediaWiki talk:Common.css/to do#Infobox, but I can look here. Give me a minute. Izno (talk) 17:54, 9 September 2021 (UTC)
This is a little more involved than I expected. Maybe have a go of the transition (in the sandbox) and then I can point out what else to change/add. Izno (talk) 18:08, 9 September 2021 (UTC)
Izno, I put something in the sandbox that seems to work (basically a direct copy from fr:MediaWiki:Common.css. comments, corrections, clean up etc. are welcome. Frietjes (talk) 18:43, 14 September 2021 (UTC)
Think I've finished the majority of this, child boxes are my bane so I haven't done the rest of that. Izno (talk) 00:09, 15 September 2021 (UTC)
Izno, awesome! is the unfinished part when this box is a child, or when a child is embedded in this box? Frietjes (talk) 19:54, 16 September 2021 (UTC)
Nah, the current child in the this infobox.
Well, there is a problem if this is embedded in another; the TemplateStyles are not output for that case (I made a related change not to recently). No-one has noticed so far for the dozen infoboxes I've converted. If you want to futz with that case in the module sandbox... I was having problems getting that working such that the tag would be output sanely. Izno (talk) 21:48, 16 September 2021 (UTC)
Izno, I think I fixed the "map" child box at the foot of the infobox, and for some reason this works for the last testcase. of course, you can only really debug the templatestyles for the last testcase if you only have that case on the page, otherwise it picks up the templatestyles from the other cases. I had a look at Module:Infobox, and at first I thought it was because we were concating a mw.html object with a string, but tostring didn't fix the problem. I am sure someone at WT:Lua could probably figure it out faster. expand templates apparently doesn't show the templatestyles? Frietjes (talk) 18:07, 20 September 2021 (UTC)
"This works" won't work when we transition the core styles to TemplateStyles, hence the dedicated parameters in the template.
expand templates apparently doesn't show the templatestyles Yes, I tried to say this at the TemplateStyles are not output for that case (I made a related change not to recently), it's why the loadTemplateStyles() call got moved into the ~= child case. Izno (talk) 18:24, 20 September 2021 (UTC)
May be a difference between browsers, but the last test case works for me with the most recent Module:Infobox/sandbox via Template:Infobox/sandbox. Thanks for working on this! Plastikspork ―Œ(talk) 22:40, 20 September 2021 (UTC)
looks good to me, I have updated the template to use the new code. the templatestyles for the child case is being discussed at Module talk:Infobox. thank you. Frietjes (talk) 19:57, 27 September 2021 (UTC)

Template-protected edit request on 7 October 2021

Please add | module = parameter to infobox. The exact addition should be the line

| data4 = {{{module|}}}

before the end of the template, but I am not sure whether data4 is the correct number. This can be useful for legislative elections in two different houses of Parliament (embedding this template inside another instance of this template). Ritchie92 (talk) 10:38, 7 October 2021 (UTC)

I think this can be achieved by using the heading function (as is done at 2016 Romanian legislative election)? Cheers, Number 57 13:18, 7 October 2021 (UTC)
@Number 57: it is not the same, and I don't think that adding the "module" parameter would be such a hassle in this template. The reason why it is useful are multiple (one of them just simplicity), but also that sometimes election articles have separate "Results" sections for each of the houses of Parliament, and therefore using the solution you gave one would not be able to define the entry results_sec. If it is possible to add this parameter, please do, I don't think it would cause any trouble. --Ritchie92 (talk) 13:29, 7 October 2021 (UTC)
Also, think about something like 2018 Mexican general election: what if one – for any reason – wants to have the legislative results before the presidential ones? In this case one needs to embed Template:Infobox election inside Template:Infobox legislative election. I really think that missing the "module" variable here is an unnecessary obstacle. --Ritchie92 (talk) 14:15, 7 October 2021 (UTC)
Regarding the results section, you can just link it to the section where all the results are (I would expect results for different houses all to be in 'Results' section).
However, I'm happy to add it. Have you tested it in the sandbox and testcases to make sure the requested change works? Cheers, Number 57 15:51, 7 October 2021 (UTC)
I just tested it on the sandbox, and this edit seems to work. See Template:Infobox legislative election/testcases#Embedding. Thanks, --Ritchie92 (talk) 16:22, 7 October 2021 (UTC)
It doesn't seem to work when it embeds inside itself, because it leaves an unused set of headings at the top (I just fixed the sandbox code). Any idea how to stop that happening? Cheers, Number 57 16:41, 7 October 2021 (UTC)
@Number 57: does this now solve the issue you were mentioning? --Ritchie92 (talk) 16:49, 7 October 2021 (UTC)
No. Can you not see the issue in the first table in the Emedding section of the testcases? You don't have to ping me as I have this on my watchlist. Number 57 16:55, 7 October 2021 (UTC)
is that better? Frietjes (talk) 17:02, 7 October 2021 (UTC)
Yes, that works – thanks! I've implemented it. Number 57 17:07, 7 October 2021 (UTC)
I had not noticed that issue at all, I thought that those empty table rows were part of the testcase, sorry! Thanks to both of you! --Ritchie92 (talk) 17:41, 7 October 2021 (UTC)
Just for my curiosity, Frietjes what does this line mean? | data4 = {{#if:{{{party1|}}}{{{party2|}}}{{{party3|}}}{{{party4|}}}{{{party5|}}}|<nowiki />
Specifically, what is the effect of putting the various entries {{{partyN|}}} one after the other? --Ritchie92 (talk) 17:49, 7 October 2021 (UTC)
Ritchie92, if all of the first five party parameters are blank, then the table is suppressed. I probably could have just checked |party1=, but I thought someone might try to skip the first one and go directly to the second. however, in the old version of the code, that would have resulted in a blank row, so it's unlikely anyone was doing that. another option would be to list all of them, but I decided that it was even more unlikely that someone would try to only use rows starting from 6 onward. Frietjes (talk) 17:53, 7 October 2021 (UTC)
OK, so it is equivalent to if (party1 or party2 or ... or party 5), where partyN is true if it is not blank. Thank you! --Ritchie92 (talk) 18:04, 7 October 2021 (UTC)
Ritchie92, yes, you are correct. if |party1=A, |party2=B, ... |party5=E then {{#if:{{{party1|}}}{{{party2|}}}{{{party3|}}}{{{party4|}}}{{{party5|}}}|true|false}} is equivalent to {{#if:ABCDE|true|false}} or true. on the other hand, if all five were blank (or omitted) this would be equivalent to {{#if: |true|false}} or false. Frietjes (talk) 20:31, 7 October 2021 (UTC)

Seats at last election

The current system for the "Last election" line isn't practical. Before the election take place, it says "Last election" in the code, but actually show "current seats". Two entirely different things in may countries. We do wan't the data to be of the last election when adding the new seats, as to have the difference be coherent with the difference in votes, which is compared with the last election. In practice, however, it mean as explained in the documentation that we have to constantly change the data right as the election take place. So we end up lowering or increasing the difference, sometime changing a gain to a lose, which is a touchy matter the day after an election. Which thus often end up with multiple edits and reverts.
We had a similar problem on the french wiki, and we changed it so that even when the election hasn't took place yet, the table show "Seats at last election", and even "Seats in XXXX" when the "previous election" code line is filled, with XXXX the year it took place. Should it be changed in the same way on this template? Not that I know how, but it seem to me it would be one less bother to deal with for the users who work with the template. Cordially.--Aréat (talk) 17:20, 10 October 2021 (UTC)

We could add a current_seats parameter that shows before an election (when ongoing = yes) and then it switches to using the last_election parameter to calculate the change. Cheers, Number 57 18:18, 10 October 2021 (UTC)
That's a solution as well. Although it doesn't solve the problem that users will fight to keep the comparison with the pre election figure rather than last election one. --Aréat (talk) 02:40, 11 October 2021 (UTC)
OK, I've added it in the testcode, and it works (see here, where all parties have current_seats of 12 but different last_election figures). I'll implement it later today (it will need a few edits preparing together as there are eight pages that are currently using seats_before that need to be converted to current_seats and have last_election added).
This won't stop editors misapplying the template, but the instructions are clear and it should be pointed out to them that this is how it's done.
Next on my wishlist for this template is to add the capability to hide the leaders or percentage fields if they aren't used. Cheers, Number 57 11:56, 11 October 2021 (UTC)

Broken template?

I noticed (clearly in the elections in Kyrgyzstan) that some parties stopped taking into account their shortnames and colors, but did not notice any changes either in the template or in the elections. The same thing was seen in the Russian election.PLATEL (talk) 18:38, 30 November 2021 (UTC)

Because the meta templates have been transferred to Module:Political party and there were a few issues while the recently created meta templates were merged into it. No more meta templates should be created – instead add new ones (or edit existing ones) at Module:Political party/A, Module:Political party/B etc. Cheers, Number 57 22:02, 30 November 2021 (UTC)

Shortname templates

As the result of a TfD earlier this year, all the /meta/shortname, color and abbrev templates were merged into a single module. In the process, the contents of much of the shortname templates has been moved into the abbrev field in the module. An RfC on this and its potential impact has been started on the module's talkpage. Input from WikiProject members is welcome. Cheers, Number 57 20:08, 4 December 2021 (UTC)

Suggestions

Philippine elections are an entirely different beast. Legislative elections are more so:

  • Senate elections since 1987 have been disputed by ad hoc alliances by parties, that do not have a figurehead leader.
  • House elections are disputed by separately by parties of the ad hoc alliances as described above, and for the most part, do not have a figurehead leader.
  • Both elections are not proportional. 2019 Philippine Senate election had Otso Diretso finishing 2nd in cumulative vote totals but won no seats.

With that said, this template is more useful than the {{Infobox election}}, as we could omit leaders. But there are issues:

  • "This lists parties that won seats. See the complete results below." Does that mean you'd, using the example earlier omit Otso Diretso, in the infobox?
  • Vote totals are nonexistent. Perhaps the editor can switch between leaders and vote totals, while keeping "%" and "Seats".
  • "%" should really be renamed to "Votes %" or something similar.
  • "±" IS ABSOLUTELY WRONG. Use "+/−". This can also be made optional. Howard the Duck (talk) 16:40, 15 December 2021 (UTC)
In response to the individual questions:
  • Yes. But the convention is that even with {{Infobox election}} we generally omit parties that didn't win seats.
  • They were removed as they made the infobox too large. I don't think they should be added back in, as inevitably some editors will try and add both the leaders and the vote figures.
  • I think it's obvious what % means, but it could have a hat-tip added to explain it if anyone really thinks readers might not understand what it represents.
  • No strong feelings on this.
As a side note, you can omit leaders from {{Infobox election}}. Cheers, Number 57 18:14, 15 December 2021 (UTC)
  • Interesting. Is this a hard rule? I know this template has proportional systems in mind, but non-proportional systems gives out wonky results.
  • Yeah that's ok. I can live with that.
  • "%" can mean "percentage of seats" too, and is even more confusing since it is to the left of the "Seats" column. In mobile devices, hat-tips don't show up. Figures here are in ##.##. "Vote %" should be just as long as that and wouldn't necessarily lengthen the column.
  • "±" actually means "positive or negative of #"; so "±5" means "either +5 or −5." That's not what we mean. Either go with "+/−" or "Diff". Even the new election table templates use "+/−". None of the definitions in ± refer to this symbol standing to as "Change from previous" or "Difference."
  • Yes, I've tried doing that, but it's ugly. For elections where leaders are not emphasized/not known/not important/not all parties have one, this template is better. Howard the Duck (talk) 18:33, 15 December 2021 (UTC)
Not a hard rule, but widely done in practice. I think if you only have one or two parties winning seats, {{Infobox election}} may be a better option anyway.
I'm not convinced any explanation of % is needed and I do think it would make the column a bit too wide, particularly in infoboxes that use 1dp. In {{Infobox election}} it's just stated as "Percentage". And I think it being to the left of the seats column is not an issue – if it was to the right I could see it being interpreted as percentage of seats (as it comes after seats), but not when it appears before the seats.
I've changed the ± symbol. Cheers, Number 57 22:54, 15 December 2021 (UTC)
Sure, but it'll just be weird to see an infobox with alliances having 56%, and 5%, 4% of the vote... with the alliance with 14% of the vote and extensively covered in the article excluded. I thought infoboxes are summaries of the article? And how about independents? I've personally excluded those, but I wonder how those are supposed to be handled with.
It wouldn't be too wide. If anything "Vote %" will make it wider by one character unless no party won 10%+ of the vote.
Vote %
29.99
%
29.99
Also, for some reason, on my screen, there's a significant space to the leftmost digit. Howard the Duck (talk) 12:35, 16 December 2021 (UTC)

Regarding maximum limit

Is there any maximum limit about how many parties should be added in the Infobox? The template reads "upto 35 parties". I've added 37 parties and 1 Independent in the Next Indian general election, but only 37 parties are shown in the Infobox, 38th entry is not visible. As India has a Multi-party system, it's usual to have numerous political parties in the Lok Sabha. I request to maximize the number of entry limit upto 40. 10:36, 13 January 2023 (UTC)

@SharadSHRD7: Done. Number 57 13:32, 13 January 2023 (UTC)
Thank you. SharadSHRD7 (talk) 13:45, 13 January 2023 (UTC)

Party Colour Template

Could someone make changes to the template so that the "Party color" template can be used, instead adding party hex colours. ValenciaThunderbolt (talk) 18:28, 27 January 2023 (UTC)

My mistake, it does. ValenciaThunderbolt (talk) 18:29, 27 January 2023 (UTC)

Abbreviated and Short Name

Is there a way that this template could prioritise abbreviations over short names? ValenciaThunderbolt (talk) 21:20, 29 January 2023 (UTC)

No, this has been built to use short names. Abbreviations are meant to be very short names for small cells in tables. Number 57 21:21, 29 January 2023 (UTC)
Alright. Is there a way to guarantee the other way round then? For example, the latest Japanese election has LDP instead of Liberal Democratic. ValenciaThunderbolt (talk) 21:23, 29 January 2023 (UTC)
It is entirely dependent on the module. If the module does not have an entry in the shortname field, it defaults to the abbreviation. There is no shortname entry for the LDP. Number 57 21:29, 29 January 2023 (UTC)
Yeah, just realised when I had to add it... (naturally assume that it exists) ValenciaThunderbolt (talk) 21:31, 29 January 2023 (UTC)