Jump to content

Template talk:Infobox legislative election

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Fields for outgoing and incoming governments

[edit]

Can (optional) fields be added for the outgoing and incoming government(/cabinet/ministry) in the bottom before/after section for both Template:Infobox election and Template:Infobox legislative election? I believe this would be useful, because existing articles about specific governments often don't get linked to in the election page itself. I also notice that the before_election and after_election fields (which are intended to be used for the head of government) are sometimes misused for this (example). -- Dissident (Talk) 19:58, 12 July 2023 (UTC)[reply]

Okay, this is a good idea for parliamentary democracies. The Prime Minister isn't everything, the cabinet also matters, especially in cases where there has been a coalition, because cabinet positions are carefully distributed among the various parties with differing politics. CX Zoom[he/him] (let's talk • {CX}) 15:16, 13 July 2023 (UTC)[reply]
Infobox templates aren't heavily watched, so you might want to link this discussion at WT:E&R & WT:POLITICS. CX Zoom[he/him] (let's talk • {CX}) 15:17, 13 July 2023 (UTC)[reply]

Inclusion of Independents and Vacancies

[edit]

I was wondering what the consensus is for the inclusion of independents. I've been adding it to pages for months and included independents, but as they aren't, obviously as party, along with vacancies for upcoming elections, should they be included. What do users think about removing them from where the template is in use, such as the latest French legislative election and South Korean legislative elections too? ValenciaThunderbolt (talk) 17:15, 27 August 2023 (UTC)[reply]

Independents should be included, otherwise the number of seats won doesn't add up to the expected total. Vacancies shouldn't, as they are not seats won. If there are vacancies, it should be handled by noting in the seats_for_election parameter that not all seats were up for election like (e.g.) here. Number 57 18:03, 27 August 2023 (UTC)[reply]

The template requires urgent upgrades

[edit]

Yet again, the infobox legislative election template has unfortunately stirred up controversies on Twitter and ignited a fresh edit war. I was largely apathetic (and think it’s frankly a bit trivial) on this until now. Although I see the advantages in ILE’s vertical layout, its detractors have some fair points:

1. It lacks parameters crucial for its adaptation to the myriad of electoral systems.

2. It’s admittedly not the most aesthetically pleasing template on this site.

3. The ILE template is a bit lacking in intuitiveness (which should be one of the aims of an infobox). For all its flaws, the old Infobox Election template , with its pictures for leaders, is very intuitive at least for the largest parties. The only intuitive visual element of ILE is a tiny sliver of color to the far left end of a row.

Neither the ILE nor the IE templates are perfect. I believe, instead of this emotionally charged tug-of-war, maybe we should come together and have the best aspects of both worlds.

Many of the English Wiki’s sister sites have excellent election infoboxes. Maybe we should learn from them 沁水湾 (talk) 19:29, 15 June 2024 (UTC)[reply]

@Number 57@Anonymousioss@Volescap@Vachilles@PLATEL@Gust Justice@Bondegezou@Braganza@RyanW1995@Laester 沁水湾 (talk) 19:44, 15 June 2024 (UTC)[reply]
At the very least more things about the infobox must be customisable, and as many features as possible from Infobox election must be incorporated into it, such as the registered parameter, which is annoyingly missing. Ideally multiple columns should also be possible for elections using e.g. parallel voting. I think an import of the Spanish wiki's infobox format should at least be considered. It might serve a purpose as a middle ground between the two formats, especially in those instances where there are ~7-12 parties winning seats. Gust Justice (talk) 20:18, 15 June 2024 (UTC)[reply]
I'd like to state strong support for importing the Spanish wiki's infobox. It's already much better-suited for displaying results in situations other than the most basic two-party elections, which is only going to become more and more of a problem over time.
That said, we should probably modify the template before any kind of wider adoption, to collapse it down substantially. The Brazil example they give in the docs is horrific. Closed Limelike Curves (talk) 16:54, 23 July 2024 (UTC)[reply]
I believe that an infobox should contain information in a compact manner. I am a supporter of ILE, as this infobox is able to accommodate all the parties that have won seats, and do so in a compact manner. However, people do not find this infobox aesthetically beautiful. But if you think about it this way, in different situations and contexts these two infoboxes may look different, and neither of these two infoboxes can completely replace each other.
Right now I remembered that when I made my wiki, I used the election infobox from the Spanish Wikipedia in it. It combines well the features of both current infoboxes in use, and I think we could try translating it into English and try using it in some articles.  PLATEL  (talk) 21:07, 15 June 2024 (UTC)[reply]
No offense but the Spanish one is arguably worse than even the ILE, if there's overwhelming majority support for the IE wikibox then it should be used, all this beating around the bush about "compromise" to satisfy a tiny minority of 2-3 editors who prefer ILE instead of IE is insane. Matthew McMullin (talk) 04:03, 16 June 2024 (UTC)[reply]
That's not a fair characterisation of the discussions on this. Now it does depend on the election in question, but on the talk pages where Infobox legislative election has been used, at least half of the users in the discussion expressed support for it. Regardless, Infobox election is not usable in cases where you want to display 10 parties or more (and those instances definitely do exist), since it is limited to 9 parties/candidates. This discussion, at least as far as I understand it, is not about whether one format must be used on all pages, but rather about changes that should be made to the template. Gust Justice (talk) 07:11, 16 June 2024 (UTC)[reply]
It's definitely been used as a blank check to alter every election by Number 57, I mean come on look at the mess that is 2022 Philippine House of Representatives elections. I skimmed through the talk pages and the only people siding with the ILE were 4 editors from a year ago who alone decided they were enough for a wiki-wide consensus to start happening. Matthew McMullin (talk) 08:46, 16 June 2024 (UTC)[reply]
That's because not enough people were aware of it. A case of how to alert users about such changes. Anyway, while I prefer TILE over TIE for legislative elections (especially when there are independents elected), I think the TILE on the page needs condensing to regionalists and sector representatives. ValenciaThunderbolt (talk) 10:20, 16 June 2024 (UTC)[reply]
That's more of an issue of process than an issue with the infobox merely existing. A lot of conflicts would be better resolved if more users participated in discussions. But it seems to be a lot easier to get outrage over people's views elsewhere on the internet, than it is to use talk pages to handle the issue. Regarding 2022 Philippine House of Representatives elections I do think that the very weird electoral system warrants not showing all parties winning seats. But again: This doesn't mean every usage of Infobox legislative election is necessarily bad. Gust Justice (talk) 11:58, 16 June 2024 (UTC)[reply]
They are, however, intertwined, as if users were more aware of discussions, we not be where we are today. It is something Wikipedia is bad at, and that is to involve users in discussions. Anyway, as I've stated before on another talk page, a solution would be to condense the parties by regionalists and professions. This would drastically reduce the number of parties in TILE. ValenciaThunderbolt (talk) 12:04, 16 June 2024 (UTC)[reply]
I mean obviously this is a touchy subject given recent events but this is where extra-Wikipedian social networks *can* be used for good. Wikipedia just doesn't really have a good way to keep relevant people in the loop. All of this controversy began because someone used another platform to start a conversation about editing issues happening over here. Maybe for future reference there should be a way to formalize that network without causing further controversy. Discord, perchance. Talleyrand6 (talk) 01:35, 17 June 2024 (UTC)[reply]
I wouldn't mind that idea. I feel maybe that would be a good to keep the balance between hard-working Wikipedians, and those people who both use Wikipedia a lot and are very passionate about it. I definitely fall into the later. CainNKalos (talk) 01:41, 17 June 2024 (UTC)[reply]
@CainNKalos: A Wikipedia Politics Discord server, with various countries, would be a good way to get users and ppl involved ;) ValenciaThunderbolt (talk) 10:09, 18 June 2024 (UTC)[reply]
I support this, its also got the ability to make it easier to address disccusions as they happen, wikipedia doesn't have an easy way to notify people as decisions that have huge ramificiations are made 212.228.4.132 (talk) 18:28, 18 June 2024 (UTC)[reply]
Seconded. Hopefully we can all get this to work. CainNKalos (talk) 02:15, 20 June 2024 (UTC)[reply]
I think there may already be one Wikipedia:WikiProject Elections and Referendums#To do
I have doubts with this idea, and I'm not sure how to express it apart from Democracy for Busy People. No matter what discord (which isn't archiveable and public viewable like a forum is), there will only be a few people who are really active, and many more people with only a small interest in it.
This can be a problem if a small circle of really active people - or not even a majority, just maybe one or two people, agree on major changes, with little outside awareness, then start trying to roll it out.
Even if the rest of the userbase (excluding the general public) disagrees or has issues with it, when they try to contribute and revert and change back to a previous, more widely used state, a small concerted minority can effectively veto this through persistent editing to force through their preferences.
I don't know how to fix this, as it is a nature of online communities that most people lurk, yet Wikipedia is meant to be for the benefit of more people, not merely those who can navigate the ins and outs.
Maybe it would be better to allow just more local variation, and be more accepting if many different users, even with (or maybe especially with) little activity try to rollback bold changes.
Beyond that, maybe some policies that make it more clear when TILE and TIE can be used. Being explicit about - what is too much information, what has to be included and - what doesn't have to be, but can be included and still helpful. iamthinking2202 (please ping on reply if you would be so kind) 03:45, 23 June 2024 (UTC)[reply]
N57 posted the link to it yesterday, you can find it in the lede on Wikipedia:WikiProject Elections and Referendums. Vacant0 (talk) 09:59, 23 June 2024 (UTC)[reply]
Yes, I am the one who stirred up controversies on Twitter. But in here I respect your inputs very much, you are an excellent contributors to Wikipedia. I agree the template needs the change. But how? Anonymousioss (talk) 03:36, 16 June 2024 (UTC)[reply]
I don’t know. I just think both sides have some fair points. People are being a bit melodramatic over something relatively trivial. I just want to get the conversation started so people can channel their collective passion into something more productive than edit warring. The English Wikipedia deserves better. 沁水湾 (talk) 04:53, 16 June 2024 (UTC)[reply]
Most of the anger I've seen is mostly down to Number 57's dodgy record with "consensus" and the fact he wouldn't initially accept the will when a majority on another talk page sided against his viewpoint Matthew McMullin (talk) 05:50, 16 June 2024 (UTC)[reply]
+1 I think this is arguably a root that has given this discussion more vitriol than what the layperson would think is mundane I guess iamthinking2202 (please ping on reply if you would be so kind) 03:51, 23 June 2024 (UTC)[reply]
@沁水湾: @Gust Justice: @Matthew McMullin: @Anonymousioss: I think, both the IE and the ILE have their own advantages and disadvantages. The IE is obviously more intuitive for the major parties and more customizable for various types of electoral systems. However, the IE could only accomodate 9 different parties. The ILE is less intuitive and less customizable, but could accommodate more parties. I think we need to make ILE more intuitive and customizable. I do love both, though.
By the way, I do agree a bit with Anonymousioss and Matthew's opinions. You (沁水湾) are an excellent contributor to Wikipedia. I really love your election maps. Many of your colorful election maps adorned several IEs and ILEs on this wiki! I also love your moderate arguments and your attempts at building consensus rather than forcing your own opinions when there are so many who opposed them. RyanW1995 (talk) 06:43, 16 June 2024 (UTC)[reply]
I think 9 is a pretty fair number of parties allowed, in 90% of democracies there'll be 9 or less "major" parties, for the rare exceptions like Israel or Holland the ILE works fine (and has been used for many years afaik) Matthew McMullin (talk) 06:59, 16 June 2024 (UTC)[reply]
I have a clear preference for TILE over TIE, except for certain countries. For example, while I back having TILE for prior to 1994, I'm for TIE since 1994, as elections for the parliament also indirectly elect the President of the country. One way to represent elections could be a halfway of what I did for the result pages for Japanese election from 2003 and beyond with TILE, and using TIE. ValenciaThunderbolt (talk) 10:25, 16 June 2024 (UTC)[reply]
It could be the two major parties are represented with TIE, while the minor parties are represented with TILE. ValenciaThunderbolt (talk) 10:27, 16 June 2024 (UTC)[reply]
there doesn't need to be any "halfway point", an overwhelming supermajority of people support TIE and therefore it should be used, it's not rocket science Matthew McMullin (talk) 21:34, 16 June 2024 (UTC)[reply]
Good place to start in my eyes would be to at least specify some use cases in the template documentation, which is incredibly sparse. For example, I'd be in favor of recommending that TILE not be used for most Westminster-system elections or other elections where party leaders often end up being heads of government, such as in a lot of other European elections. I'd be in favor of in favor of most Italian and French elections (especially Fifth Republic elections) using TILE instead, since the parliamentary leaders aren't often the people who end up being heads of government. Pave Paws (talk) 10:55, 16 June 2024 (UTC)[reply]
@Pave Paws: Maybe a compromise would be that for presidential systems, TILE is use, while for non-presidential systems (excluding Westminster systems), TIE is used? ValenciaThunderbolt (talk) 10:58, 16 June 2024 (UTC)[reply]
I'm assuming you meant the reverse, though if not that's what I would prefer either way. Westminster countries like the UK, Canada, India, etc. who elect their heads of government from the party leaders and where party leaders are very much a focus of elections should have the party leaders front and center.
I think the best way to resolve the disputes over TILE in any case though is to just improve it functionally and aesthetically, as has already been proposed. It looks really ugly when there are red hyperlinks and boxes left empty, which doesn't improve the reader's experience, and aesthetic complaints have been the main driving force of the controversy. Pave Paws (talk) 11:05, 16 June 2024 (UTC)[reply]
Sorry, I meant to say including Westminster systems. Countries like South Korea and France would be good candidates for TILE, as their elections are focused on parties, rather than leaders, as their presidents are elected separately.
I think we need to see some proposed changes, as simply talking about them will get us nowhere. ValenciaThunderbolt (talk) 11:09, 16 June 2024 (UTC)[reply]
This would be a good compromise then, though I'd exclude some unique cases on either side, such as U.S. congressional elections and Israeli elections. This is probably worth another section on either this talk page or another for further comment among more people involved in the disputes. Pave Paws (talk) 11:23, 16 June 2024 (UTC)[reply]
I agree :) ValenciaThunderbolt (talk) 11:25, 16 June 2024 (UTC)[reply]
Also, what do you think of this being used to show constituency and proportional seats? ValenciaThunderbolt (talk) 11:26, 16 June 2024 (UTC)[reply]
I like it! I think it'd work well for two-round systems too. It could be improved by adding a header to the first box to show that it shows both proportional and constituency results. I think it'd work well at least until someone gets around to proposing/implementing some of the proposed changes, like supporting two or more columns to more accurately represent parallel voting and two-round systems. Pave Paws (talk) 11:40, 16 June 2024 (UTC)[reply]
Err... not a bit fan of modifying it to include columns for parallel voting or two-rounds (two-rounds could be a modified version of the one used on the 2003 Japan results page). I think I have a solution that would be a mixture of TIE and TILE for parallel elections. I'll create it later ;) ValenciaThunderbolt (talk) 11:48, 16 June 2024 (UTC)[reply]
Hey Valencia,
I’m not sure if this should be the primary way to judge whether to use TILE or not. Arguably in most elections and countries around the world nowadays, elections are centred around parties, even in Westminster systems like the UK.
Additionally, the party is often associated with the leader of the party anyway - maybe Indonesia 2024 may have some exception (Jokowi voters going for Prabowo but still sticking to PDI-P who had a different guy) - but otherwise, a focus on the leader is quite often a focus on the party’s policies anyway.
I would still argue the main criteria for use of TILE should be for number of parties. Israel doesn’t have a directly elected president, instead picking a leader from their Knesset like how the PM is picked amongst MPs in eg UK, but Israel has many parties that aren’t especially strong, and so would be hard to summarise in TIE. This isn’t the case for UK, where eg 5 parties (eg Labour, Conservative, Lib-Dem, Reform, and even SNP) would cover the vast majority of seats anyway. Not every party would have to be included, as that’s the job of the results table, which doesn’t have to be nearly-duplicated on the infobox iamthinking2202 (please ping on reply if you would be so kind) 06:20, 17 June 2024 (UTC)[reply]
Agreed on this. In a lot of countries, campaigning centers around the party leaders of major parties, especially by the news media. In South Korea, you'd be hard-pressed not to see SBS or MBC not talking about Lee Jae-myung when referring to the Democratic Party. He is everywhere. In France, National Rally features Jordan Bardella and Marine Le Pen front and center in their campaign ads. In Japan, the big three newspapers along with all the TV channels all feature Kishida, Izumi, and Yamaguchi more heavily than practically everyone else in their parties. In Thailand, it's Pita vs Paetongtarn vs Prayut, everyone else didn't really matter. The news media and parties themselves lead voters to associate the parties with their leaders, especially major parties. Obviously not the case in every country, but this seems to be the case in the vast majority of democracies.
As a long-time reader of election articles and someone's who's finally about to start editing them, I agree with this interpretation of TILE vs TIE usage. TILE should be used for elections where there's a large number of parties and the "big" ones don't get substantially larger proportion of votes compared to "smaller" parties and neither party is considered more important than the other. So this should be on a country by country basis, perhaps era by era as well depending on the electoral systems. TIE has been very useful as a reader to learn quickly overall about that election (main parties, leaders, votes, turnout, etc); TILE conversely hasn't been useful (just looks like a rehash of the results table, also is tough to read at times and small).
An issue with the current TILE format is that it's not that intuitive many times. The percent column is supposed to be percent of total votes, but sometimes it's kinda tough to determine whether the percent refers to the proportion of total votes or the proportion of seats. For example the 2023 Thai general election page. I've caught myself at times thinking that percent column refers to the seats and not actual votes. This is an aspect of TILE that needs to be remedied.
Another issue with TILE is that the percent, seats, and +/- columns are too small compared to the other columns. It's as if they don't matter when they are what actually matters in every election. The 2023 Thai election page is a case in point. Infoboxes should state their info clearly. Average Pennsylvanian (talk) 08:37, 19 June 2024 (UTC)[reply]
One other thing I'd like to mention is we need to think about people reading on mobile devices. Using TILE for say the Philippines makes sense since the parties are personality vehicles and aren't really a thing, but a reader on their phone will have to scroll a while to get past the infobox to actually read the article. If we imagine India has having a Philippines-like system and not the one it currently has, it would get out of hand really fast. So imo not every party needs to be featured in TILE (same for TIE as has been convention mostly). Average Pennsylvanian (talk) 08:48, 19 June 2024 (UTC)[reply]
@Average Pennsylvanian: I created a remedy, of sorts, to the problems you've stated. I have this issue with 57 last year, but he said that going by the PR votes is best, as it represents voters more. ValenciaThunderbolt (talk) 11:57, 19 June 2024 (UTC)[reply]
Not sure if I completely see eye to eye here. This could work if used for a results page, but I don't believe so for the main page, mainly cause of my reasons. I believe more work needs to be done on TILE to make it more versatile/display more info, especially number of votes cast. For your example, I don't think three tables are needed if it's for a main page - using one would be more concise and better for readers. But for a dedicated results page, it could work. I just think more work needs to be done on the template.
I can see the reasoning behind the PR votes, but people do vote for the parties at the same time. When it comes to reporting in an infobox, one voting method shouldn't be preferred over the other imo Average Pennsylvanian (talk) 02:26, 20 June 2024 (UTC)[reply]
@Average Pennsylvanian: Completely agree about preferences. I would back a revision to TIE, so that it can be presented like Scotland's elections. ValenciaThunderbolt (talk) 10:46, 20 June 2024 (UTC)[reply]
+1 seconding that opinion iamthinking2202 (please ping on reply if you would be so kind) 03:49, 23 June 2024 (UTC)[reply]
I agree with all these points. Wish I had more to add to a good discusssion! Carlp941 (talk) 03:28, 21 June 2024 (UTC)[reply]
I'm in favour of this. Whilst I'd prefer to just use TIE for all, and thus just have the one standard, I can definitely see why you'd need to use TILE instead for some countries, like Israel, the Netherlands, Philippines, etc. Maybe have something along the lines of 'use TIE always; except for situations where TIE is impracticable, use TILE instead.'? CainNKalos (talk) 01:39, 17 June 2024 (UTC)[reply]
My two cents should be a blanket policy of "effectiveness."
IE works good for certain elections (such as France with its blocs or Anglo countries with their strong party leaders) but ILE works well for other elections (i.e. Netherlands or Israel or Brazil). I don't see why we need a blanket policy forcing one format or another. There should be local consensuses of relevant editors to decide that with, of course, room for consensuses to change.
I will say, as a mapper, that having one standard for everything is often times a road block to the more important final product. Each country or each election demands adaptability. Find most effective solution for each scenario.
As for ILE as a whole, people more competent on this issue should decide. Talleyrand6 (talk) 01:41, 17 June 2024 (UTC)[reply]
FWIW, I generally think TIE is often better than TILE, and if it had to be a pure binary one or other, I think TIE works better than TILE
I think TILE is more appropriate for elections with many *important* parties, and where the “big” parties don’t get many votes. Ie, TILE is better for situations where it has a main advantage - handles lots of parties better. Otherwise the additional information TIE provides, images, leaders seat, ultimately improves the whole page.
I think what may be needed is clarification on **how much info is too much**. The line about “The less information it contains, the more effectively it serves that purpose,” has been misused in a crusade against TIE in favour of making everything TILE. Removing information like leader’s seat means less information, but it doesn’t suddenly make the article a whole lot clearer. It possible, the wording should be changed to allow for more leeway in allowing images and that.
Additionally the TILE format is quite similar to a results table anyway, and aesthetically, in many cases, isn’t better.
I’m not sure so much if it is about TILE needing upgrades versus a more consensual and limited approach to using it. iamthinking2202 (please ping on reply if you would be so kind) 06:10, 17 June 2024 (UTC)[reply]
Re: 2022 Philippine House of Representatives elections (COI: Main editor of these articles.) -- aside from the fact that the Philippine House of Representatives has the chamber with the most number of parties in the world, with about 70+ currently, and that there are no actual "party leaders" during the actual FPTP election and campaigning (certainly the main selling point of TIE), that's why TILE was used instead. Previously, this was in TIE with so-called FPTP party leaders that I made up (LOL sorry) and the partylist results not even in the infobox. I'd agree that showing all 55 winning parties is too much. What I did is lumped the smaller parties into "Others", so the infobox is now much shorter and manageable now. Howard the Duck (talk) 09:24, 19 June 2024 (UTC)[reply]
Maybe it would be beneficial to have a Westminster template, seperate from ILE and IE? ILE is better for systems where "hung parliaments" are the norm, and IE is better for two-party systems. Westminster is neither of these - parties tend to win majorities or close to it, but there are more than two. Could be looked into DimensionalFusion (talk) 21:43, 20 June 2024 (UTC)[reply]
I agree. Number 57's attitude when faced with considerable dissent is to just scram into the bushes, which (surprise!) only antagonizes people more. I'd like to see how the two-standard-infobox idea is faring now. Ivario (talk) 23:03, 11 October 2024 (UTC)[reply]

Table header "%"

[edit]

In the table header, change "%" to "Vote %" to be clear on this is a percentage of seats (currently it can be votes or seats... or leaders or party names or colors, who knows?). This should be non-controversial enough as normally "%" refers to the percentage of the column to its left, but in this case, the column to its left are names and not numbers so it needs further clarification. Howard the Duck (talk) 20:58, 27 September 2024 (UTC)[reply]

There is already <abbr title="Percentage vote share">%</abbr> that clarifies what the percentage sign represents. This abbreviation should be removed if the header is changed to "% of votes" or "Vote %". Vacant0 (talkcontribs) 14:26, 28 September 2024 (UTC)[reply]
This doesn't show up on mobile, and many people read via their mobile phones. MOS:NOTOOLTIPS are bad in this case as "%" is not an abbreviation of "Percentage of votes" (it is, however, the perfect symbol for "percentage", and only that word), as opposed to "+/–" being the shorthand for "change". I won't oppose removing the tool tip if the column title is expanded. Howard the Duck (talk) 23:09, 28 September 2024 (UTC)[reply]
I'd support this change. Vacant0 (talkcontribs) 14:49, 29 September 2024 (UTC)[reply]
In column header "%" replace it with "Vote %", then remove the tool tip. Howard the Duck (talk) 21:38, 1 October 2024 (UTC)[reply]
 Done --Ahecht (TALK
PAGE
)
23:35, 1 October 2024 (UTC)[reply]

Request to hide +/- column

[edit]

Requesting to add a noseatchange option. Respublik (talk) 21:23, 16 October 2024 (UTC)[reply]

You can do that using the first_election = yes parameter. Number 57 22:48, 16 October 2024 (UTC)[reply]
OK, thank you. That could be better explained in the documentation, but in principle that works fine. Respublik (talk) 17:59, 17 October 2024 (UTC)[reply]

Color not working

[edit]

On 1886 Dutch general election, the per-party colors are not showing up. Is this a bug in this template or in Template:Infobox legislative election/row? I'm having trouble tracing what's going on because the syntax is hard to read. (I suppose I could add some clarifying whitespace if no one objects.) -- Beland (talk) 03:53, 16 November 2024 (UTC)[reply]

Not sure what the issue is, as I can see the colours. Number 57 15:33, 16 November 2024 (UTC)[reply]
Here is what it looks like for me in light mode; turns out you can see the colors, but the block is so narrow it's difficult to do so:
Here is what it looks like for me in dark mode, which is what I usually use; the colors are obscured by a thick grey border:
-- Beland (talk) 21:57, 16 November 2024 (UTC)[reply]
Same problem on 2007 Croatian parliamentary election. -- Beland (talk) 23:16, 24 November 2024 (UTC)[reply]
I suspect it might be an issue in Template:Infobox legislative election/styles.css but I'm not familiar with that sort of code. Number 57 22:52, 25 November 2024 (UTC)[reply]
the coloring uses border-left: 4px solid red; for example instead of an empty cell with a background. this could be the problem. Frietjes (talk) 21:03, 27 November 2024 (UTC)[reply]
Ah, I think so. That's being set in Template:Infobox legislative election/row, and I think the color needs to be set there and not the CSS file because it depends on a parameter that varies on a per-row basis. -- Beland (talk) 22:31, 27 November 2024 (UTC)[reply]
I have put in some HTML comments and whitespace to try to make Template:Infobox legislative election/row more readable. I also changed that template to use {{legend}} instead of "border-left", and that seems to be working for me. The testcases look good to me, but feel free to ping me if it looks like I've broken something on one of the thousands of pages that use this template. (Obviously I can't check them all.) -- Beland (talk) 00:17, 28 November 2024 (UTC)[reply]
Apologies, but I've reverted the change. IMO it looked awful – it made every row in the party column have the same dark background and the colour box was far larger than necessary (which is awkward for infoboxes where they were already filled to nearly maximum width. Such a significant change needs a discussion rather than simply implementation IMO. Number 57 00:23, 28 November 2024 (UTC)[reply]
Feel free to fix it in any way you like, then. While you're in there, I'll note that the test case for the 2018 Mexican general election has a lack of cell padding that's causing text to jam up directly against the cell borders. -- Beland (talk) 00:25, 28 November 2024 (UTC)[reply]
Ah, I see the background color problem now that you've pointed it out. It looks like {{legend}} is incompatible with whatever code is generating alternating black and grey row background colors. -- Beland (talk) 00:29, 28 November 2024 (UTC)[reply]
Re the text jamming issue, that started happening a few months ago when there was some change to the underlying Wikipedia appearance code. I'm not sure what change they made that caused it to start doing that... It wasn't an issue until very recently. Number 57 00:31, 28 November 2024 (UTC)[reply]
I have updated the sandbox to use a span with spaces inside instead of {{legend}}. Does that look OK? -- Beland (talk) 05:19, 29 November 2024 (UTC)[reply]
should we use the same format as {{Election results}} instead? Frietjes (talk) 16:49, 29 November 2024 (UTC)[reply]
OK, I have changed the sandbox to use an empty td instead of a span. How does that look? -- Beland (talk) 21:31, 29 November 2024 (UTC)[reply]
I have also just put in a fix on Template:Infobox legislative election/styles.css for the text colliding with table cell borders (e.g. for 2018 Mexican general election, which is one of the test cases). The padding was getting set to "inherit" by general CSS, and I had to override it with an !important. -- Beland (talk) 22:13, 29 November 2024 (UTC)[reply]
Great work, thank you! The solution proposed for the colours is also good – my only query is whether that column can be narrowed? I tried setting the width to 0.25px but it didn't seem to have any effect. Cheers, Number 57 11:09, 1 December 2024 (UTC)[reply]

I tried this change which seems to make the boxes 4px wide, but better would be to put this styling in a class in the css file :) Plastikspork ―Œ(talk) 19:54, 1 December 2024 (UTC)[reply]

This edit has made the color blocks too narrow IMHO (which they were before, too). For example, on the "British general election, 2015" test case, there are four different shades of green. Having only a few pixels of color up against a strongly contrasting background makes it difficult for the eye to distinguish among the four (!) different shades of green well enough to figure out which ones are being used where on the map. This can be made worse in certain circumstances, such as glare from the sun, blurry vision, or strong glasses that cause prismatic effects around color boundaries. {{legend}}, which is the standard template for this use of color, uses a square block of 1.25 em (which for me is 15.4 px). If there are objections that 15.4 px is too wide, and 4 px causes visibility issues, 8 px (which is what my edits resulted in) seems like a good compromise. Even at only half the standard width, there's enough of a middle that's not right up against an edge so that the true color can be reasonably perceived. -- Beland (talk) 03:27, 2 December 2024 (UTC)[reply]