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. |
Oversized maps
[edit]User:RAGentry has been adding oversized maps to hundreds of US city articles. My concern is that this makes the infobox unnecessarily wide (the default size is 250 px). At Berryville, Texas, for example, there are no photos in the infobox, so no need for an oversized map. The input of others would be appreciated. Magnolia677 (talk) 15:52, 2 June 2024 (UTC)
In my defense, 250 is only a default and not prescribed, and there are plenty of articles which use 280 as the size of their infobox. 280 makes the maps easier to see and understand and ensures that the entire shape fits into the map. The idea of "oversized" is subjective, considering it is only a 30 pixel difference. Is it really that big of an issue? RAGentry (talk) (contributions) 16:03, 2 June 2024 (UTC)
- Also, I note that on the main page of this template, Template:Infobox settlement, one of the example infoboxes is 275px wide, while the other is 290px wide. These are both wider than the default of 250px. That both examples are wider than 250px seems to me to suggest that expanding beyond the default of 250px is definitely acceptable, especially if the circumstances support it (such as increased readability of interactive map thumbnails), and especially if they are not being increased beyond 290px wide, which is the width of one of the example infoboxes in the documentation of this template. I would suggest that the examples of an infobox in its documentation provide more weight to the acceptable widths of a template than the default width in the template parameters. RAGentry (talk) (contributions) 16:14, 2 June 2024 (UTC)
- In general, the size fields shouldn't exist at all to all wikimedia to auto size the images according to user preference settings or default settings, except to shrink photos in infoboxes. Large fixed sizes are a problem on small devices such as smartphones, especially in infoboxes. Almost always, I delete those fields from the infobox, and I recommend you to do the same. • Sbmeirow • Talk • 21:35, 2 June 2024 (UTC)
- That's a good point; I see how having no fixed size could be beneficial. The problem with this is that in the case of interactive maps, the infobox is ultimately going to be widened by the frame width set in the Maplink template. Removing these creates a rectangular map (300px wide by 200px high) rather than a square map, which is the norm for interactive maps on city articles. It also makes the infobox 300px wide, which might be offensive to some people. What do you think might be a good workaround for this? Also, where in preferences can the images be auto-sized? — RAGentry (talk) (contributions) 22:13, 2 June 2024 (UTC)
- Where does it say square maps "is the norm for interactive maps on city articles"? At Template:Maplink, the infobox example is rectangular, and the template specifically states "additional parameters are available to customise the displayed map", such as width and height. Magnolia677 (talk) 22:43, 2 June 2024 (UTC)
- Norms just refer to something that is standard, not necessarily something that is written in as policy. I mentioned it to explain why I chose to use square maps, referring to the trend seen in articles such as Erie, Pennsylvania, Harrisburg, Pennsylvania, San Francisco, and others. Of course, it is possible and likely that there are others that do not match this trend, but I was using square maps because it is what I saw in other interactive maps on city articles. The example in a template documentation is not a requirement, and that there are additional parameters available to customise the displayed map seems to suggest that it is not a requirement for it to be rectangular. — RAGentry (talk) (contributions) 23:45, 2 June 2024 (UTC)
- Where does it say square maps "is the norm for interactive maps on city articles"? At Template:Maplink, the infobox example is rectangular, and the template specifically states "additional parameters are available to customise the displayed map", such as width and height. Magnolia677 (talk) 22:43, 2 June 2024 (UTC)
- My slight mistake, preferences has a setting for thumbnail photos in the article, it appears to not affect the infobox. In general, many infoboxes are already too dang big in community articles, and increasing the size of photos or maps makes the problem much much worse. Remember that a user can click on a photo or map to see a full size version of it, thus solving the size problem. Please do not increase the size of maps or images in infoboxes. • Sbmeirow • Talk • 22:40, 2 June 2024 (UTC)
- Ok, I will not increase the size of maps or images in infoboxes. — RAGentry (talk) (contributions) 23:45, 2 June 2024 (UTC)
- That's a good point; I see how having no fixed size could be beneficial. The problem with this is that in the case of interactive maps, the infobox is ultimately going to be widened by the frame width set in the Maplink template. Removing these creates a rectangular map (300px wide by 200px high) rather than a square map, which is the norm for interactive maps on city articles. It also makes the infobox 300px wide, which might be offensive to some people. What do you think might be a good workaround for this? Also, where in preferences can the images be auto-sized? — RAGentry (talk) (contributions) 22:13, 2 June 2024 (UTC)
A small bug/edit request
[edit]Greetings and felicitations. In the La Habra, California infobox there is a carriage return between the estimate and the estimated population note. This is consistent between (Mac) Firefox and Safari in desktop mode, though it does not appear in iOS Safari. I'm hoping that someone can find and fix the problem, please. —DocWatson42 (talk) 05:36, 13 June 2024 (UTC)
- I don't think this is a bug on the template side, the code is
| label88 = • Estimate <div class="ib-settlement-fn">({{{pop_est_as_of}}}){{{pop_est_footnotes|}}}</div>
- Which puts the "as of" directly before the footnotes with no extra space, so it's likely a wrapping thing. Primefac (talk) 22:20, 13 June 2024 (UTC)
- Okay—thank you. ^_^ DocWatson42 (talk) 01:51, 14 June 2024 (UTC)
Conversion error
[edit]I've encountered a strange error in the area fields and I can't think what's causing it.
In KM2, area total can be larger than area land. But once converted into sq mi, area land becomes larger than area total. You can see this in action at Borough of Halton.
I can only think it must be something hard coded in the conversion, perhaps a rounding error? It doesn't occur when using Template:Convert. Perhaps someone more knowledgeable than me will know what might be behind it please. Dgp4004 (talk) 16:40, 14 June 2024 (UTC)
- Having experimented a little, it seems to be a problem very specific to the figure of 90km2.
- 89km2 converts correctly to 34 sq mi.
- 91km2 converts correctly to 35 sq mi.
- But 90km2 concerts incorrectly to 30 sq mi.
- Very bizarre. Dgp4004 (talk) 16:51, 14 June 2024 (UTC)
- Likewise, I have noticed that the template is inaccurately converting 5,181 km2 to 2,000 sq mi on the Powys page. It should be 2,003 sq mi.
- Would it not make sense to use template:convert in the infobox rather than the formulas used presently which don't seem to work?
- Dgp4004 (talk) 08:53, 16 June 2024 (UTC)
- Probably; this template is old and likely had much of its features written/created before {{convert}} was as good or widely-used as it is now. Primefac (talk) 15:40, 16 June 2024 (UTC)
- Likewise, I have noticed that the template is inaccurately converting 5,181 km2 to 2,000 sq mi on the Powys page. It should be 2,003 sq mi.
A few comments here:
- 5181 km2 should convert to 2000.3 mi2, not 2003. The template is behaving correctly in this case.
- The value 90 km2 is ambiguous: it's unclear whether it has one or two significant figures. The template assumes it has one significant figure, hence does the conversion like
{{convert|90|km2|mi2|abbr=on|sigfig=1}}
→ 90 km2 (30 sq mi). There's currently no way to specify significant figures to the template. - {{convert}} has a more clever way of determining rounding, so it does the conversion more like you expect:
{{convert|9000|km2|mi2|abbr=on}}
→ 9,000 km2 (3,500 sq mi). You may not consider this correct, however, since it only preserves 2 significant figures. - Probably the right thing to do is to substitute {{convinfobox}} for {{Infobox settlement/areadisp}}.
I'll experiment with this in the sandbox.
— hike395 (talk) 02:40, 18 June 2024 (UTC)
- Sadly, {{convinfobox}} only accepts up to 3 units, while {{Infobox settlement/areadisp}} can handle 5. {{Infobox settlement/areadisp}} also correctly sets the order of the displayed units according to country, while {{convinfobox}} always puts the specified unit first.
- This can all be fixed if we port convinfobox over to Lua, which will take some amount of work. — hike395 (talk) 02:48, 18 June 2024 (UTC)
- Thank you so much for looking into it—I wouldn't know where to start! Dgp4004 (talk) 07:27, 18 June 2024 (UTC)
Edit request 17 June 2024
[edit]![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Description of suggested change:
- Please replace the manual conversion formulas in this template with Template:Convert as unfortunately the existing set up is producing errors (please see Template talk:Infobox settlement#Conversion error above). Probably not a quick edit I'm afraid, sorry to make big work.
Dgp4004 (talk) 17:19, 17 June 2024 (UTC)
- I think the area formulas are actually held in this sub-template: Template:Infobox settlement/areadisp. Would this request be better submitted there or is this sufficient please?
- Dgp4004 (talk) 17:25, 17 June 2024 (UTC)
Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. – Jonesey95 (talk) 23:16, 17 June 2024 (UTC)
- I would if I understood it. But it's fiendishly complex sadly. Dgp4004 (talk) 23:20, 17 June 2024 (UTC)
Location labels unreadable in dark mode
[edit]In 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)
Template-protected edit request on 9 August 2024
[edit]![]() | This 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)