Template talk:Infobox settlement#Strange bug resulting from latest changes
{{skip to talk}}
{{talk header|archives=no|search=no}}
{{WikiProject banner shell|1=
{{WikiProject Geography}}
{{WikiProject Cities}}
{{WikiProject Infoboxes}}
}}
{{Permanently protected}}
{{User:MiszaBot/config
|archiveheader = {{talk archive navigation}}
|maxarchivesize = 100K
|counter = 33
|algo = old(150d)
|minthreadsleft = 8
|archive = Template talk:Infobox settlement/Archive %(counter)d
}}
{{Old AfD multi |date1=31 December 2014 |result1=Do not merge |link1={{canonicalurl:Wikipedia:Templates for discussion/Log/2014 December 31#Template:Infobox_settlement}} |date2=2019 March 3 |result2=No consensus to merge |link2={{canonicalurl:Wikipedia:Templates for discussion/Log/2019 March 3#Template:Infobox former subdivision}} |date3=2020 July 19 |result3=No consensus |link3={{canonicalurl:Wikipedia:Templates for discussion/Log/2020 July 19#Template:Infobox Australian place}} |date4=2020 August 23 |result4=Keep |link4={{canonicalurl:Wikipedia:Templates for discussion/Log/2020 August 23#Template:Infobox U.S. state symbols}} |date5=2020 September 22 |result5=No consensus |link5={{canonicalurl:Wikipedia:Templates for discussion/Log/2020 September 22#Template:Infobox province or territory of Canada}} |date6=4 September 2021 |result6=No consensus |page6=Wikipedia:Templates for discussion/Log/2021 September 4#Template:Infobox former subdivision |date7=19 July 2024 |result7=Keep |page7=Wikipedia:Templates for discussion/Log/2024 July 19#Settlement infobox templates}}
{{Archives|auto=short|Other archives:
- 2012 TfD}}
Location labels unreadable in dark mode
In dark mode, location labels on map are black text on a black background. This does not happen for me when I use {{tl|location map}} directly, but it does happen in the examples on the {{tl|Infobox settlement}} documentation. I'm not sure where this CSS lives, but it appears that this happens because the color is coming from this block:
{{syntaxhighlight|lang=css|code=
@media (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .mw-parser-output .od, html.skin-theme-clientpref-os .mw-parser-output .od .pv > div, html.skin-theme-clientpref-os .mw-parser-output .od .pl > div, html.skin-theme-clientpref-os .mw-parser-output .od .pr > div {
background: white !important;
color: #000 !important;
}
}
}}
but the background color is coming from this block:
{{syntaxhighlight|lang=css|code=
@media screen and (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .mw-parser-output .infobox-full-data:not(.notheme) div:not(.notheme) {
background: #1f1f23 !important;
color: #f8f9fa;
}
}
}}
The second block has higher priority, so the !important background-color there takes effect. I think the color in the second block is missing its !important; that is why it is not overriding the !important color from the first block. Though I'm not sure why the first block is trying to use black text on white background in dark mode. -- Beland (talk) 21:05, 2 August 2024 (UTC)
:This seems to have been fixed, though nothing was changed at Template:Infobox settlement/styles.css or Template:Infobox settlement. Perhaps it was a problem in skin CSS? -- Beland (talk) 17:21, 12 September 2024 (UTC)
::Unfortunately it has regressed again. The second CSS block should not apply as the parent div
has class="notheme"
, but something is bugged.
::It's a hack, but adding :::It's only a problem when using 'Automatic' (and OS is set to dark mode). The label looks as expected when the colour mode is set to 'Dark'. One would expect these two options to be the same, but no. I am seriously disappointed in the way Wikipedia is handling dark mode, everything is hacked together and there is zero guidance given to editors who run into these issues on the daily. :::They ask us to report issues with dark mode to templates that have problems, but they don't tell anyone how to solve to problems. The people who make and fix templates clearly have no idea how dark mode should be implemented. -- Susko3 (talk) 03:18, 29 December 2024 (UTC) ::::There's plenty of technical advice at mw:Recommendations for night mode compatibility on Wikimedia wikis. -- Beland (talk) 22:27, 29 December 2024 (UTC) on the Kilacheri page the langauges (Tamil and Telugu) are not showing in the infobox. Drew Stanley (talk) 22:13, 14 November 2024 (UTC) :You have to provide the analogous _info fields for the _title fields to render. This is intended to show e.g. the percentage of people speaking each language. --Joy (talk) 10:34, 18 November 2024 (UTC) Greetings and felicitations. In Boston, the reference note for the "Population estimate" field appears in my browser under the field's label, not next to the figure. —DocWatson42 (talk) 15:20, 18 November 2024 (UTC) :Same here. In the test cases we have, it's showing on the same line, e.g. in Template:Infobox settlement/testcases#Case 7: Sequim, Washington. Something is causing the left column at Boston to be narrower - it shows as 101.5px here, while the test case has 135.45px. --Joy (talk) 08:36, 19 November 2024 (UTC) ::{{Fixed}} --- I added See for example Bir Tawil. When the dark mode in the new Vector 2022 Appearance menu (represented by an incognito icon) is enabled, the pushpin label is dark text on a dark background. Aaron Liu (talk) 23:39, 21 November 2024 (UTC) :They all look fine to me. To be clear, I am looking at the three maps, selectable with radio buttons, and I see black text on a light-gray map background or black text on a near-white background. Maybe provide a screen shot. – Jonesey95 (talk) 18:32, 22 November 2024 (UTC) ::As noted above in #Location labels unreadable in dark mode, the problem only occurs when the Color is set to Dark on this menu and the OS is set to dark mode. The labels look fine when Color is set to Dark on this menu. That means this problem has already been solved; the solution just needs to be duplicated for the automatic classes. -- Beland (talk) 01:03, 3 January 2025 (UTC) Greater Toronto Area uses :File:Greater Toronto Area map.svg for the image_map parameter of this template. Unfortunately, that image has a transparent background, meaning that in dark mode, the black text it uses in the outer areas is unreadable. There is no image_class parameter for this template which would allow me to set the CSS class of this map to "skin-invert-image" which would fix the problem (though it would also generate some ugly colors). -- Beland (talk) 01:22, 3 January 2025 (UTC) :Fixed with {{tl|!}} and documented. -- Beland (talk) 10:49, 4 January 2025 (UTC) To change "named_for" to "named_after". Reason: while the two phrases are considered synonymous in American English, they are not in British English, where 'named after' means 'in honour of' ("I'd like to name this after Xxxx, who died last year"), and 'named for' means 'named at the request of' ("could you name this for me, please"). Having "named for" looks very ugly to UK eyes, particularly when appearing on UK-related pages. Thanks! - MPF (talk) 00:02, 28 February 2025 (UTC) :Someone, please! Additional point: at wikidata, the standard is also named after - MPF (talk) 21:17, 13 March 2025 (UTC) ::{{Done}} — hike395 (talk) 21:37, 13 March 2025 (UTC) :::@Hike395 many thanks, much appreciated! - MPF (talk) 22:13, 13 March 2025 (UTC) Is there a way to actually remove the auto-generated short description? The documentation says to add a {{tl|short description}} template at the top of the article, but that actually gives it two short descriptions. You'll see them if you have preferences enabled to show the short desc in gray at the top of articles. I know this isn't the biggest deal in the world, but it rubs me the wrong way; I'd really like to have just one short description, even when the auto-generated one is problematic. --Trovatore (talk) 04:03, 11 March 2025 (UTC) :Looking up higher in this talk page, I found the answer: you can add :Why :Anyway, I think this parameter should be documented in the documentation for {{tl|infobox settlement}}, but when I went to edit the documentation, it turns out that the banner talking about the autogenerated short description comes from another template, {{tl|auto short description}}, and it wasn't clear to me whether the same parameter applies everywhere that that template is transcluded. Could someone look into this? --Trovatore (talk) 04:13, 11 March 2025 (UTC) The infobox uses the Settlement short description module to create a SD based on various infobox parameters. This "auto generated" SD can sometimes produce a long or "messy" SD that triggers error reports. Adding :{{ping|Trovatore}} — GhostInTheMachine talk to me 20:15, 9 April 2025 (UTC) ::Thanks, {{u|GhostInTheMachine}}. But I'm afraid I still think it's not very discoverable. At the top of the page there's a blue circle with a lowercase i in it that says {{tq|This template adds an automatically generated short description. If the automatic short description is not optimal, replace it by adding {{tl|Short description}} at the top of the article.}}. That's where I'd really like the documentation to show up, if it's possible. It seems to be a big mess to figure out how to add that, with all the transclusions and so on. --Trovatore (talk) 01:19, 10 April 2025 (UTC) ::: The {{tl|auto short description}} template is a flag in the template documentation that adds the template to a category and displays that information message. The message is fixed, but it is correct for all cases – if the auto-SD from the infobox is not good enough, then override it by adding a {{tl|short description}} template at the top of the article. The infobox auto-SD is generated with {{code|noreplace}} set and so any manual SD from the article would be the one that is used. In some rare occasions, the auto-SD (while not used) does trigger an error report. In this case, it can be suppressed via adding ::: So, the SD from the infobox is often good enough or it can be easily superseded by editing the article and adding a {{tl|short description}} template at the top. Only very rarely is there any need to use the :::: Well, it depends on what you mean by "need". I have a CSS setting that shows the SD on the web version, and seeing two SDs, well, let's say I find it untidy. As I said in my initial message, this isn't the biggest deal in the world, but I would prefer that the autogenerated SD were always removed whenever a local one is set. --Trovatore (talk) 18:24, 10 April 2025 (UTC) ::::: If you really do not want to see the ghost SD, then add the line {{code|.shortdescription ~ .shortdescription { display: none !important; } }} to your common.css after the existing line — GhostInTheMachine talk to me 07:28, 11 April 2025 (UTC) :::::: Well, but I still know it's "there", whatever that means. This is my aesthetic sense as a software engineer complaining. I would just prefer it weren't there. As I said not the biggest deal in the world, but it's a "code smell". --Trovatore (talk) 19:06, 11 April 2025 (UTC) :::::::As far as I know, the shortdesc helper gadget shows only the canonical SD for a given page, properly ignoring the replaced automatic version when there is an article-local description. – Jonesey95 (talk) 02:57, 13 April 2025 (UTC) :::::::: True. Trovatore was expressing disquiet about the ghost SD displayed via the CSS override. I have offered suitable CSS that modifies the override — GhostInTheMachine talk to me 08:26, 15 April 2025 (UTC) ::::::::: Apparently I didn't explain myself sufficiently. I wasn't upset about myself seeing it, exactly. I was upset that the second SD was still "there" to be seen. I haven't looked into the software sufficiently to be sure what "there" even means, but it seems like a code smell. --Trovatore (talk) 17:53, 15 April 2025 (UTC) ::::::::::Items wrapped with "display:none" are still "there" also, as is a whole bunch of other stuff that is normally hidden from the typical reader. When you choose to show deliberately hidden items with custom CSS, I think that is for you to cope with. – Jonesey95 (talk) 16:33, 17 April 2025 (UTC)class="notheme"
to every child div
of the parent Help with languages
A(n apparent) small bug
nowrap
to three infobox labels that were wrapping poorly. Now live. — hike395 (talk) 10:52, 19 November 2024 (UTC)Labeled pushpin description unreadable on dark mode
Dark mode problem with image_map
Edit request 27 February 2025
Overriding short description
short_description = no
to the parameters.short_description = no
instead of just short_description =
? That's a side issue; I don't want to fixate on that. But I do think that would be a better syntax.short_description = no
to the infobox instructs the module to not do this. Setting the switch does not set an alternative SD, but allows the SD in the article to be the only one. I have added a line to the documentation — GhostInTheMachine talk to me 20:14, 9 April 2025 (UTC)short_description = no
to the article infobox.short_description = no
trick — GhostInTheMachine talk to me 13:34, 10 April 2025 (UTC)Worrying trend on articles about Croatian coastal cities that were under occupation by Fascist Italy