Template talk:Canadian election result
This Talk page is centralized for all templates in the {{Canadian election result}} series. {{Canadian election result/top}} {{Canadian election result}} {{Canadian election result/total}} {{Canadian election result/source}} {{Canadian election result/note}} {{Canadian election result/hold}} {{Canadian election result/gain}} and the {{CANelec…)) equivalents |
Template:Canadian election result is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
This is the talk page for discussing improvements to the Canadian election result template. |
|
Archives: 1Auto-archiving period: 6 months |
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
|
Template-protected edit request on 19 July 2022
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Hi! This template isn't working well with dark mode on the Wikipedia iOS app. The background color of all the rows remains light-colored even on dark mode. Text entered into the candidate, votes, %, %change, and expenditures cells then turn practically invisible on dark mode, as they invert color from black to white.
Could this template be brought into line with the template Template: Election box winning candidate with party link as seen in UK elections like Uxbridge and South Ruislip. The table cells in that template change color properly with light/dark mode. If that's not possible, a quick fix would be to set all regular non-link text in this template to black.
Thank you! Deathying (talk) 20:11, 19 July 2022 (UTC)
- Not done please make the changes you want to Template:Canadian election result/sandbox as if you could edit this page yourself. Once done and tested, please reactivate the edit request template above. If this is just a suggestion for someone else to improve the page one day, that is fine - but someone will have to do the work before uninvolved patrollers will be able to promote the changes to production. — xaosflux Talk 14:26, 28 July 2022 (UTC)
Template-protected edit request on 4 October 2022
editThis edit request to Template:Canadian election result/top has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Replace {{Hover title|Change in percentage value since previous election|±%}}
with {{Tooltip|±%|Change in percentage value since previous election}}
. Per TFD, {{Hover title}} is to be merged with {{Tooltip}}. You can see the change made in Template:Canadian election result/top/sandbox. ಮಲ್ನಾಡಾಚ್ ಕೊಂಕ್ಣೊ (talk) 14:44, 4 October 2022 (UTC)
- Done – Jonesey95 (talk) 14:55, 4 October 2022 (UTC)
Attempt to edit /top
edit@Wbm1058: Do you remember which pages had errors from my edit of Template:Canadian election result/top? My sandbox test cases all looked fine, so I don't know in what situations the code breaks. —Arctic Gnome (talk • contribs) 15:33, 23 October 2023 (UTC)
- Look at Template:Canadian election result/top/sandbox. There are two issues to note there.
- 1) Joeyconnick has repeatedly tried to tell you that
we do not use curly quotes per MOS:CURLY
(diff) – do you have a problem with that? - 2) The header says "[[Error Invalid general election]]:" while the live version which I reverted to Template:Canadian election result/top does not. What caused that change? Does your new version introduce some form of error checking that the previous version did not have? wbm1058 (talk) 15:50, 23 October 2023 (UTC)
- 1) The 'find' command shows all quotes whether I put normal quotes or curly ones into the search bar. How do you detect these curly quotes? Is the easiest solution to retype all quotes in the template before publishing?
- 2) All of my test cases looked fine, so I assumed that error was a result of the template not having inputs, and it would be fine in the finished product. Should I fix that by giving the template a placeholder value to use when there is no input? —Arctic Gnome (talk • contribs) 14:53, 24 October 2023 (UTC)
- re: 1) OK, I see that the curly quotes were apparently first added to the template by Who R you? back in 2014, and you've been trying to make changes to older versions where the curly quotes had not been replaced with straight quotes. I just used the JavaScript Wiki Browser to do that. That tool has a bit of a learning curve, so I'm willing to help by making that edit again as needed in the sandbox, just for the asking. I also noted the need to replace the ellipsis (…) with 3 periods. – wbm1058 (talk) 01:01, 25 October 2023 (UTC)
- re: 2) One of my patrols is for pages transcluding {{error}}s in main namespace and a lot of Canadian election-related pages were turning up on that list, which is what brought me here. When a page lands on that list, I expect to see an obvious, big, red, error message stating the problem and giving instructions on how to fix the reported problem. Although I saw one or two pages showing me an error similar to what the sandbox template shows, most did not show obvious errors. The template should be coded to ensure that it doesn't report "false-positive errors", which can be a bit tricky to do. I was trying to find where this error message was coming from and I don't think I'd tracked it down yet. When I reverted you on July 8, I was hoping that you would figure it out, but, I guess I need to do more since we're still stuck here. – wbm1058 (talk) 01:20, 25 October 2023 (UTC)
- Thanks, I'll try again when I have some free time. I've been trying to minimize the size of the template, but there might be too many moving parts. —Arctic Gnome (talk • contribs) 18:21, 25 October 2023 (UTC)
Template-protected edit request on 27 October 2024
editThis edit request to Template:Canadian election result/top has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Would it be possible to edit the {{Canadian election result/top}} template so that they are sorted alphabetically by riding name in their respective YEAR CATEGORY FOR GENERAL ELECTIONS (e.g. in Category:2021 Canadian federal election results by riding). As of right now, they seem to be categorized without a Sort key (e.g. [[Category:"Year" "Jusrisidiction" election results by riding]] instead of [[Category:"Year" "Jusrisidiction" election results by riding|"Riding name"]]), which is not very helpful for navigation within categories for a specific general election. From what I understand, the edit would look something like this:
<!-- YEAR CATEGORY FOR GENERAL ELECTIONS -->|{{category handler|template=[[Category:{{{election|{{{2}}}}}} {{#switch:{{{jurisdiction|{{{1}}}}}}|CA=Canadian federal|AB=Alberta general|BC=British Columbia general|MB=Manitoba general|NB=New Brunswick general|NF=Newfoundland general|NL=Newfoundland and Labrador general|NS=Nova Scotia general|NT=Northwest Territories general|N-W=North-West Territories general|NU=Nunavut general|ON=Ontario general|PE=Prince Edward Island general|QC=Quebec general|SK=Saskatchewan general|YK|YT=Yukon general|MTL=Montreal municipal|OTT=Ottawa municipal|TOR=Toronto municipal|VAN=Vancouver municipal|}} election results by riding|{{{riding|{{{3}}}}}}]]|nocat={{{nocat|}}}}}}}<!-- |