Template talk:Infobox settlement
This is the talk page for discussing improvements to the Infobox settlement template. |
|
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||
|
Template:Infobox settlement 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 template was nominated for deletion. Please review the prior discussions if you are considering re-nomination:
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 31, 32, 33 |
Other archives: 2012 TfD |
This page has archives. Sections older than 90 days may be automatically archived by Lowercase sigmabot III when more than 5 sections are present. |
Location labels unreadable in dark mode
editIn dark mode, location labels on map are black text on a black background. This does not happen for me when I use {{location map}} directly, but it does happen in the examples on the {{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:
@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:
@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)
Template-protected edit request on 9 August 2024
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Add a parameter for flag_type, so that other options like banners can also be added (eg. State banners, municipal banners, county banners etc). Since the infobox Indian state or territory is a customised wrapper for this infobox, and it is explicitly mentioned that Indian states use banners and not flags (since they are only used for the official purpose by the government and not as the representation for the state), I did not want to add the parameter of flag to them, but rather of banner. Pur 0 0 (talk) 15:02, 9 August 2024 (UTC)
- Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. – Jonesey95 (talk) 21:07, 10 August 2024 (UTC)
Mandatory hidden OpenStreetMap
editHi, an OSM map is required for all settlements, but nearly all the times it makes its Infobox ugly. I propose to place an OSM map for all instances of this template and then hiding that by using {{hidden begin}} and {{hidden end}} templates. But if needed, the editors can expand OSM by default by a parameter. Something like this:
Shiraz
Persian: شیراز | |
---|---|
Shiraz | |
skyline of Shiraz; | |
Nickname: City of Gardens | |
Coordinates: 29°36′36″N 52°32′33″E / 29.61000°N 52.54250°E |
Hooman Mallahzadeh (talk) 12:39, 5 September 2024 (UTC)
- Sorry, why would it be required? It's optional per Wikipedia:Requests for comment/Mapframe maps in infoboxes
- At the same time, what's the ugly part exactly? --Joy (talk) 22:40, 7 September 2024 (UTC)
- Which reminds me, we never added the standard optional mapframe support here. I'll go check in the sandbox if I can do that now, IIRC the local code here was somewhat more convoluted than average. --Joy (talk) 19:02, 8 September 2024 (UTC)
- I also do not see anything required about the mapframe map. I picked a few articles from a dab page and do not see one at Newton, Edmonton, or Newton, Surrey, or Newtown Cunningham, or Newton, Massachusetts. – Jonesey95 (talk) 11:46, 9 September 2024 (UTC)
- Which reminds me, we never added the standard optional mapframe support here. I'll go check in the sandbox if I can do that now, IIRC the local code here was somewhat more convoluted than average. --Joy (talk) 19:02, 8 September 2024 (UTC)
mapframe support
editPhew, [1] was annoying to do, but didn't actually seem particularly complex.
I noticed we actually have a test case already at Template:Infobox settlement/testcases2#Case 17: Chicago with mapframe
Any objections to making this go live? --Joy (talk) 19:38, 8 September 2024 (UTC)
- As nobody raised any objections, it's in the template now, let's see what we find out with real-world testing. --Joy (talk) 08:31, 27 September 2024 (UTC)
UK should default to metric units
editWhy does this template display the imperial units first for UK places? All of the official data for geographical areas and statistical data is in km². So that should be displayed first. No need for an inaccurate conversion. Craobh àrd (talk) 03:11, 9 October 2024 (UTC)
Edit request 11 October 2024
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Description of suggested change:
Module:Settlement short description is used by the Infobox settlement template to create a default Short description. Sometimes this default is too long and the article is flagged in the maintenance category Category:Articles with long short description. To cope with this, the module has a "kill switch" (at line 82) so that, if the infobox includes short_description = no
, then the module returns an empty SD and leaves the manual SD from the article to have effect.
This kill switch has been in place since the first version of the module in January 2019. Sadly, the infobox template code does not include this parameter in the Check for unknown parameters
list and so, in the few(?) articles where the kill switch has to be used, the edit preview displays a Preview warning: Page using Template:Infobox settlement with unknown parameter "short_description"
. This means that it can "reasonably" be removed as an error. See [2].
Diff: add short_description
to the Check for unknown parameters
list. Please re-sort the list at the same time — GhostInTheMachine talk to me 20:24, 11 October 2024 (UTC)
- Done – Jonesey95 (talk) 13:40, 13 October 2024 (UTC)