Template talk:Election results/Archive 2

Archive 1 Archive 2

Width parameter

Hi, I very much love this template and prefere it over Election boxes:))). However one thing Election boxes get right is the consistent overall width of the rendered tables. It would be great to be able to set the width of {{Election results}} to create clear, consistent articles, e.g. when using multible {{Election results}} one below the other in one article, like here in Senate Constituency no. 2. Setting the width parameter for the same value in all templates would resolve the issue of visually unpleasing tables with different widths. — Antoni12345 (talk) 18:54, 11 November 2023 (UTC)

Is this what you had in mind (i.e. being able to set a defined width for candidates and party columns)? Cheers, Number 57 14:16, 13 November 2023 (UTC)

Need Percentage of Total Electors

Add an additional value for the percentage (+/-) of Total Electors, calculated from the electors in the Previous Election. Make it simple.


|previouselectors=

and its not recommended for First elections of every state IJohnKennady (talk) 15:16, 26 November 2023 (UTC)

I don't think this is necessary, and it wouldn't fit in the table. Number 57 16:03, 26 November 2023 (UTC)

Inaccessible text in new night (dark) theme

If you visit https://en.m.wikipedia.org/wiki/2024_South_Korean_legislative_election?minervanightmode=1 you'll see Registered voters/turnout and Total votes display as gray text on a black background.

Could the following diff please be applied to fix this ?

https://en.wikipedia.org/w/index.php?title=Special%3AComparePages&page1=Module%3AElection+results&page2=Module%3AElection+results%2Fsandbox

Thanks in advance! 🐸 Jdlrobson (talk) 06:17, 13 April 2024 (UTC)

Module:Election results is fully protected. I've updated the request template from {{TPER}}.
I've tested {{Election results/sandbox}} in a preview in Minerva night mode and it seems to work for me. Plus the proposed change makes sense with regard to the neighboring code :css('background', 'inherit') and the page mw:Help:Lint errors/night-mode-unaware-background-color. —⁠andrybak (talk) 15:27, 13 April 2024 (UTC)
  Done For what it's worth I am not convinced this page really needs to be full protected. * Pppery * it has begun... 15:35, 13 April 2024 (UTC)
With <9k transclusions, I generally agree. Primefac (talk) 14:53, 15 April 2024 (UTC)
I've seen template-confirmed editors mess up other widely-used templates because they don't properly check the outcomes of their changes (it's amazing how many people don't check their changes in the sandbox) – for example, someone made a mess of {{Infobox election}} around a month ago. Due to the relatively high complexity of this module, a large number of testcases need to be checked when changes are made to make sure they don't inadvertently affect certain types of tables. With all this in mind, I would prefer this to remain fully-protected to make sure there is less chance of a big cock-up being made. Number 57 15:17, 15 April 2024 (UTC)
Hrm... that's a reasonable argument. Primefac (talk) 15:19, 15 April 2024 (UTC)

Showing alliance on constituency elections

in some countries, the larger alliance is as important as the original party. One example is Malaysia, the Nordic countries, India and the Philippines. Would it be possible to add a separate column for alliance? I hacked this by using parenthesis, such as "Nationalist People's Coalition (UniTeam Alliance)" in Template:2022 Philippine Senate election results. Ideally a possible "Alliance" column is beside the "Party" column, either before or after. Howard the Duck (talk) 13:19, 2 May 2024 (UTC)

You can already do this – see below. Cheers, Number 57 00:10, 4 May 2024 (UTC)
Thanks! Would it be possible, if alliances are used, to default to the party if left blank? Howard the Duck (talk) 17:41, 4 May 2024 (UTC)
Yes, if you use the alliance field but not party (you can put either a party or an alliance in the alliance field), it will appear as the second table below. Number 57 20:18, 4 May 2024 (UTC)
Great. This should work and would align this with the actual per party results table. Howard the Duck (talk) 05:03, 5 May 2024 (UTC)
CandidateAlliance and partyVotes%
Robin PadillaUniTeam AlliancePDP–Laban26,612,43452.31
Loren LegardaMP3 AllianceNationalist People's Coalition24,264,96947.69
Total50,877,403100.00
CandidateAlliance and/or partyVotes%
Robin PadillaUniTeam AlliancePDP–Laban26,612,43452.31
Loren LegardaNationalist People's Coalition24,264,96947.69
Total50,877,403100.00

Possible bug when votes against are unknown

In the 1986 Czechoslovak parliamentary election article, the table seems to add an extra column when the number of votes against, using the row2 and votes2 fields, is unknown. --Minoa (talk) 19:50, 19 May 2024 (UTC)

Sorted. Cheers, Number 57 20:52, 19 May 2024 (UTC)