Map placement
[edit]
- I think User:(WT-en) NJR ZA is still working on perfecting it, he's just really busy with work at the moment... On California I just moved the map outside of the template for now, which achieves the desired result... until we find a way to do that within the template – (WT-en) cacahuate talk 16:58, 28 May 2007 (EDT)
- I'll copy it to a local wiki and have a go at getting it to work correctly. Will report back here. --(WT-en) NJR_ZA 02:00, 29 May 2007 (EDT)
Map size
[edit]How can I shrink down a map within the template? See Sweden – (WT-en) cacahuate talk 02:19, 15 October 2007 (EDT)
- The template supports a regionmapsize parameter, but it was not documented. I have added it to the template documentation now. See change on Sweden --(WT-en) NJR_ZA 03:32, 15 October 2007 (EDT)
- Cool, thanks! The maps don't seem to appear in the Region section any longer, is it intentional that they are forced below the toc now? Not necessarily a complaint, but just noticed the difference – (WT-en) cacahuate talk 13:15, 15 October 2007 (EDT)
- Intentional. On many country pages (USA and others) the region map ended up between the TOC and quickbar, leaving an extremely narrow area for text. On Sweden that would actually be OK, 'cause it's a narrow map, but mostly it just did not look good. --(WT-en) NJR_ZA 13:49, 15 October 2007 (EDT)
Number of Items in Regionlist
[edit]Is there a limit of items in the Regionlist Template? I've been working on Germany, which I'm breaking up into 16 regions (for the 16 states, for the time being, since that's how the actual articles are written), and after the 15th item I get an error like ({{{{region159items}}}). I found if I break it into two region lists and start the numbering again at 1, the problem is avoided. Almost definitely not a typo, I'm guessing something with the template code..... Any thoughts appreciated. (WT-en) hokiesvt 16:21, 17 March 2009 (EDT)
Improving our Template:Regionlist
[edit]This is long overdue from six years ago when Ryan perspicaciously said at Template talk:Regionlist:
The current map placement, which puts the map after the table of regions, is obviously not ideal. However, trying to modify the template so that the map appears next to the region key causes clashes with quickbars, the TOC, and other page elements. If anyone out there has the time and ability to re-work this template to use divs instead of a table it might go a long way towards improving the usability and look of the template... -- (WT-en) Ryan • (talk) • 15:54, 28 May 2007 (EDT)
Now the map is alongside the table of regions and often (especially with the small screen widths that are found on laptops and smart phones) the list is squeezed into a worm or under-runs the map. -- Alice✉ 23:21, 27 January 2013 (UTC)
Layout problems
[edit]1. TOC + Regions List + Map all three next to each other takes up too much space on many screens, especially with wide maps (eg Bali).
2. TOC floats left, Regions List flows past bottom of it and jumps left jarringly.
@1, let's put the Map above the Region List. Maybe put <br clear="right"> after the Map in the template to do that. This would give us room for larger maps which would be nice for readability, too. Shall we? --Rogerhc (talk) 21:36, 5 February 2013 (UTC)
@2, the jump left is fussy to prevent with CSS but maybe with some experimentation might be done. --Rogerhc (talk) 21:36, 5 February 2013 (UTC)
- If I'm not mistaken, we are going to do away with the left floating ToC in destintion guides in the near future, so we needn't base all design decisions on the problems the current TOC poses. There's still a lot of room for improvement, though, so I hope this comment doesn't suppress new ideas.
- I tend to agree that we should feature our maps more prominently (by putting them above the regionlist). Nowadays they're getting to be rather pretty, and are hugely useful. As we (I think) are beginning to introduce image maps, putting the regionlist template right beside them will be less crucial, as they will themselves be a tool for site navigation. --Peter Talk 05:39, 6 February 2013 (UTC)
- Most people have more horizontal screen space than vertical. Having the map side-by-side with the legend makes it easier to correlate colors. LtPowers (talk) 18:22, 16 February 2013 (UTC)
regionXitems
[edit]I've noticed that only few articles used the various parameters regionXitems (furthermore few of them by mistake use them in place of regionXdescription).
In the past, in the Italian version of this template, I've eliminated them, converging their content into the relevants regionXdescription. In this why is simplified the template and the creation/maintanability of an article.
If you think that this approach can be suitable also for the en:voy version, I can take in change the task to adjust all the involved articles through a bot. Let me know. --Andyrom75 (talk) 15:32, 4 June 2013 (UTC)
- No way. United States of America needs them, for sure, and they're useful in many other similar situations. LtPowers (talk) 20:04, 4 June 2013 (UTC)
- As you prefer, but take into account that to show those information regionXitem it's not strictly necessary, see it:USA for example. The difference consist just on the way you write regionXdescription. --Andyrom75 (talk) 21:39, 4 June 2013 (UTC)
- The items are pretty useful for groupings like with the USA, but even more so for district schemes. Several of our star guides use it, e.g., Washington, D.C.#Districts, Chicago#Districts, etc. One could just list the items in the description, but I think it's cleaner the way it is now. --Peter Talk 21:44, 4 June 2013 (UTC)
- Agreed; no offense to the fine editors at it:voy, but I don't think that's a very good way to present that information, either aesthetically or from a usability standpoint. LtPowers (talk) 22:45, 4 June 2013 (UTC)
- Ok, no problem. It was just a proposal :-) --Andyrom75 (talk) 23:21, 4 June 2013 (UTC)
- Agreed; no offense to the fine editors at it:voy, but I don't think that's a very good way to present that information, either aesthetically or from a usability standpoint. LtPowers (talk) 22:45, 4 June 2013 (UTC)
- The items are pretty useful for groupings like with the USA, but even more so for district schemes. Several of our star guides use it, e.g., Washington, D.C.#Districts, Chicago#Districts, etc. One could just list the items in the description, but I think it's cleaner the way it is now. --Peter Talk 21:44, 4 June 2013 (UTC)
Right or left-aligned map caption
[edit]Can we make the map caption ("regionmaptext") left-aligned? Or if there are cases where this would be a bad idea, can we have an optional parameter to make it left-aligned? Captions for ordinary images are left aligned. And the way the map caption always runs up hard against the "enlarge" icon is not pleasing to the eye (IMO), and readers not familiar with the purpose of the icon may assume it relates to the caption, rather than to the map. Nurg (talk) 20:44, 9 July 2013 (UTC)
- I kind of wonder why we need text saying, "this is a color coded regions map." Shouldn't that be obvious from the image itself? It seems to me like just a very small bit of wasted vertical space. --Peter Talk 21:51, 9 July 2013 (UTC)
- In it:voy I've suppressed the regionmaptext parameter so I show only the image/map without any kind of text below it. If you like this approach just let me know and I can take in charge both the modification of the template and the cleaning of the article through bot. --Andyrom75 (talk) 19:19, 10 July 2013 (UTC)
Alt text for the visually handicapped?
[edit]Does this template in it's current form actually accept parameters for alt text? --W. Franke-mailtalk 19:29, 10 July 2013 (UTC)
- Not currently, but it can be easily implemented. In the it:voy version I've used a standard alternative name identical for all the maps but it can be personalized with the regionmaptext that we were discussing above. --Andyrom75 (talk) 23:07, 10 July 2013 (UTC)
Overlaying region descriptions
[edit]With a wide region map (and narrow browser window) the map overlays the region descriptions, sometimes making the text unreadable. See e.g. Southern Finland at window width below 500px (I need some 725px before the layout gets good). The map in that article is quite wide, which allows information on the map to be actually seen, which otherwise is good.
A solution that puts the region list below the map when the text column becomes too narrow would be optimal. Otherwise a parameter for wide region maps ("text_below=true"?) would solve the problem in many cases.
--LPfi (talk) 07:28, 27 April 2016 (UTC)
- Is anyone still designing web pages for fewer than 800 pixels anymore? Powers (talk) 17:36, 27 April 2016 (UTC)
- Less than 800px may be unusual for desktop and even laptop displays, but a wide display allows having several windows side by side. I am now using a 560px window, which gives about optimal line length where there are images in the margin, somewhat too long lines elsewhere. I would prefer a narrower browser window to avoid it overlapping the editor or a second browser window (the mail client is usually on a separate virtual desk). 800px would be horrible without padding, where such a window is necessary I maximize the window to get essential information and flee elsewhere as soon as possible. --LPfi (talk) 19:40, 27 April 2016 (UTC)
- I understand your plight, but my original question remains unanswered. It was my impression that most design assumes about a 600px column width at minimum (that is, 800px minus interface elements), but my information could be out of date. Powers (talk) 21:27, 27 April 2016 (UTC)
Mobile rendering issue
[edit]The table used in this template relies on the default styles of a table.
In mobile all tables have collapsed borders by default so as a result the color of the key appears cramped.
Please can you explicitly add this style to the table to make this render better on mobile?:
border-collapse: separate;
border-spacing: 2px;
Jdlrobson (talk) 22:59, 29 August 2016 (UTC)
- I think this is now done - the template that needed to be modified was Template:Regionlist/item. Let me know if further changes are necessary. -- Ryan • (talk) • 00:09, 30 August 2016 (UTC)
Use in another language
[edit]How to i use this template in another language's Wikivoyage? —The preceding comment was added by Sony dandiwal (talk • contribs)
- You'll need to create a new template on that Wikivoyage language version and write the appropriate template code. You could use this template as a basis, but its parameters would need to be translated, and you have to be careful to maintain attribution. Powers (talk) 00:58, 9 December 2016 (UTC)
- okay, thank you Powers - Sony dandiwal (talk) 03:53, 9 December 2016 (UTC)
"Hack" for toggling static and dynamic maps on destination articles
[edit]This template can be "hacked" without listing regions in order to offer both a static map and a dynamic map on city/destination articles without cluttering the article. See Manhattan/Central Park for an example. The code is:
{{Mapshape}} {{Mapshapes|Q7733}} {{Regionlist | regionmap=Centralpark map.png | regionmaptext=Map of Central Park | regionmapsize=450px | regionInteractiveMap=map1 | regionmapLat=40.78216 | regionmapLong=-73.96660 | regionmapZoom=14 }}
Nelson Ricardo (talk) 21:23, 5 June 2021 (UTC)
- On mobile, when I press the blue link to switch to interactive map, nothing happens. Is that correct? --Comment by Selfie City (talk | contributions) 00:42, 6 June 2021 (UTC)
- D'oh! Thanks for pointing that out. I hadn't tried on my smartphone, only on my laptop. Hopefully, someone with the requisite template-editing knowledge can review and fix. It's not just happening when "hacked". Portugal uses the template as an actual region list, and it, too, fails on mobile. Nelson Ricardo (talk) 01:45, 6 June 2021 (UTC)
- @Andyrom75, when you get a chance, would you please see why Special:Diff/4073000 isn't working on mobile? Thank you! Nelson Ricardo (talk) 13:01, 6 June 2021 (UTC)
- Nelson Ricardo, I discussed this topic time ago in lounge. Is an old wikimedia bug that prevent it to work on mobile. --Andyrom75 (talk) 13:31, 11 June 2021 (UTC)
- @Andyrom75, when you get a chance, would you please see why Special:Diff/4073000 isn't working on mobile? Thank you! Nelson Ricardo (talk) 13:01, 6 June 2021 (UTC)
- D'oh! Thanks for pointing that out. I hadn't tried on my smartphone, only on my laptop. Hopefully, someone with the requisite template-editing knowledge can review and fix. It's not just happening when "hacked". Portugal uses the template as an actual region list, and it, too, fails on mobile. Nelson Ricardo (talk) 01:45, 6 June 2021 (UTC)
Using template Regionlist without a map
[edit]Region 1 name Region 1 name is ... |
Region 2 name Region 2 name is ... |
When you use the template:Regionlist without a map, you get a result as shown above. But without the map, the colored rectangles have no function. Shouldn't the rectangles be suppressed in this situation, by making some changes to the template? --FredTC (talk) 13:19, 5 June 2021 (UTC)
- That makes sense to me. Ground Zero (talk) 14:00, 5 June 2021 (UTC)
- I would recommend always including a map for a region list, whether static or dynamic, or both. Which region do you feel doesn't need one? Nelson Ricardo (talk) 17:24, 5 June 2021 (UTC)
- Extraregion? --Comment by Selfie City (talk | contributions) 20:00, 5 June 2021 (UTC)
- Yes, they should be suppressed in that situation. And I think the answer is when there's a region that doesn't or doesn't yet need subregion articles but has clearly-defined regions that can be effectively described in a "Regions" section. We could say that should be a subsection of "Understand" in that situation, but that doesn't fundamentally change things, I think. Ikan Kekek (talk) 20:09, 5 June 2021 (UTC)
- I feel that an extraregion should still include a map, but if you prefer to not have one, perhaps don't use the Regionlist template and just use bullets instead. Nelson Ricardo (talk) 21:11, 5 June 2021 (UTC)
- Agree with GZ here. SHB2000 (talk | contribs | en.wikipedia) 21:18, 5 June 2021 (UTC)
- Extraregion? --Comment by Selfie City (talk | contributions) 20:00, 5 June 2021 (UTC)
- I've made an edit to {{Regionlist/item}} that allows the colour box to be bypassed: Add
|nocolor=
somewhere among the parameters with anything following the "=", and the colour box should be suppressed. It works in a way that doesn't alter any existing regionboxes, so there is no need to worry about that. I also made an attempt to implement that into {{Regionlist}}, but that didn't work out the way I wanted it to. I don't have much free time to put into it right now, so I'll have to leave it at that for now. If anyone wants to try their hand at adding the parameter into Regionlist, be my guest. I should say though, that personally I prefer the look of the white boxes before the text, but be your own judge:{{Regionlist/item|blue|Destination|Items|Description|nocolor=y}}
- -- Wauteurz (talk) 12:19, 6 June 2021 (UTC)
- Thank you for your effort Wauteurz. Your edit to Regionlist/item works well, but the way Regionlist has to use it, needs some more analysing. In the situation of Southern Russia there is a "call" to Regionlist with a map but also one without a map. In that case, the one without a map must show the color. Another situation is in Amsterdam where a map is not specified with te call to Regionlist, but there is a {{mapframe}} with colored areas used instead. So, there needs to be a way to handle this. I do have an idea for using the regionmap parameter in several situations:
- 1. | regionmap=The name of the region map
- 2. | regionmap=
- 3. | regionmap=same
- 4. | regionmap=mapframe
- In situation 1 a map is displayes and the color are too. In situation 2 no map is displayed and no colors. Situations 3 and 4 have a key word at the place of the map name and do display colors, but no map. Situation 3 is for having more than one call to Regionlist with a map specified at the first call and the rest with same. Situation 4 is for having one call to Regionlist that takes its map from a {{mapframe}}.
- Do you think I have covered all situations? If so, is it programmable? --FredTC (talk) 12:32, 7 June 2021 (UTC)
- @FredTC: For clarity, I don't intend to automate {{Regionlist}} to check whether colours are needed in the article it gets called in. Disabling colours would be a completely manual process the way I plan to implement it. Southern Russia therefore isn't a problem case. Even if colour detection were automated, you could instead use {{Regionlist/item}} directly for the listing of Crimea there, but again, that isn't a case where there'd be an issue with the changes I have in mind. In any case, the change I have projected is to add in an optional parameter for {{Regionlist}}, which disables colours in every instance of {{Regionlist/item}} within it. The implementations of the template are simply too different from each other to reliably detect them, and the amount of cases where you would want to hide the colours are relatively few. Could you automate it? Without a doubt, but I am in no way capable of automating it. Someone else would have to do so.
- Cases such as Amsterdam can be fixed easily. The dynamic map can be called from the {{Regionlist}} instead (and in all honesty, shouldn't all instances of Regionlist be unified somewhat?). If it is wanted, I can make some maintenance categories for Regionlist that throw the article into a category when, for example, there isn't a static map, there isn't a dynamic map, there are both a static and dynamic map (or neither of the two). This would pave the way for either automated or manual editing of these articles to (ideally), be like Portugal, which allows the user to choose between a dynamic and a static map. At the very least this would make documentation for the Mapmaking Expedition and Requests for maps a lot easier.
-- Wauteurz (talk) 19:07, 7 June 2021 (UTC)
What am I doing wrong?
[edit]At Portugal#Regions, I have defined region#items for several regions, but for region4, they're not showing up in the output. Everything looks OK to me, so what am I missing here? Nelson Ricardo 2500 (talk) 23:10, 24 August 2021 (UTC)
- I tested it out but it seems there's nothing I could find. I tested the
region4items=
variable out quickly with Sydney, and it worked out fine. Not sure what's wrong. SHB2000 (talk | contribs | meta.wikimedia) 23:47, 24 August 2021 (UTC)
Template:If mobile
[edit]Do we have an equivalent on Wikivoyage to en:Wikipedia's w:Template:If mobile? Cheers, • • • Peter (Southwood) (talk): 17:37, 22 March 2022 (UTC)
- @Pbsouthwood: You can check the associated Wikidata item to see that we do not (yet). —Justin (koavf)❤T☮C☺M☯ 17:41, 22 March 2022 (UTC)
- @Koavf:, Thanks, was not aware I could do that. • • • Peter (Southwood) (talk): 06:52, 23 March 2022 (UTC)
- No problem. On (most) any piece of content from (most) any WMF project, if you press Ctrl+Alt+G, you will be taken to the associated Wikidata item (if it exists, which it usually does). If you need a template reproduced here, admins can import it via Special:Import. —Justin (koavf)❤T☮C☺M☯ 06:56, 23 March 2022 (UTC)
- @Koavf:, Useful to know, hope I remember when I next need it. Do you know if it would run in voy? I am not familiar with the code, and I have had trouble with templates from WP needing supporting software before.• • • Peter (Southwood) (talk): 07:03, 23 March 2022 (UTC)
- Great question. Probably not very easily, as it relies on a couple dozen modules and templates and those rely on others, etc. This is why I am very hesitant to import on any wiki where I'm an admin: it's almost always more trouble than it's worth. Maybe if/when global templates come into existence, maybe this will all go away, but until then... :/ —Justin (koavf)❤T☮C☺M☯ 07:16, 23 March 2022 (UTC)
- @Evad37:, could you advise on potential complications? • • • Peter (Southwood) (talk): 07:37, 23 March 2022 (UTC)
- We also need to import w:Template:If mobile/styles.css and I'm pretty sure it will need an interface admin to do it. @Andyrom75:, by any chance, can you import it? SHB2000 (talk | contribs | meta.wikimedia) 08:08, 23 March 2022 (UTC)
- Before importing something, may I understand which is the specific need here in en:voy? I'd like to check first if there's any alternative. --Andyrom75 (talk) 09:00, 23 March 2022 (UTC)
- We also need to import w:Template:If mobile/styles.css and I'm pretty sure it will need an interface admin to do it. @Andyrom75:, by any chance, can you import it? SHB2000 (talk | contribs | meta.wikimedia) 08:08, 23 March 2022 (UTC)
- @Evad37:, could you advise on potential complications? • • • Peter (Southwood) (talk): 07:37, 23 March 2022 (UTC)
- Great question. Probably not very easily, as it relies on a couple dozen modules and templates and those rely on others, etc. This is why I am very hesitant to import on any wiki where I'm an admin: it's almost always more trouble than it's worth. Maybe if/when global templates come into existence, maybe this will all go away, but until then... :/ —Justin (koavf)❤T☮C☺M☯ 07:16, 23 March 2022 (UTC)
- @Koavf:, Useful to know, hope I remember when I next need it. Do you know if it would run in voy? I am not familiar with the code, and I have had trouble with templates from WP needing supporting software before.• • • Peter (Southwood) (talk): 07:03, 23 March 2022 (UTC)
- No problem. On (most) any piece of content from (most) any WMF project, if you press Ctrl+Alt+G, you will be taken to the associated Wikidata item (if it exists, which it usually does). If you need a template reproduced here, admins can import it via Special:Import. —Justin (koavf)❤T☮C☺M☯ 06:56, 23 March 2022 (UTC)
- @Koavf:, Thanks, was not aware I could do that. • • • Peter (Southwood) (talk): 06:52, 23 March 2022 (UTC)
This kind of convoluted templates may have all kinds of odd side effects unless well implemented, and may not do what one supposes them to do. Perhaps one can trust this to be well implemented (I don't know), and the documentation is clear: "detects whether it is being used on the mobile version of Wikipedia (en.m.wikipedia.org)". The rationale is odd, though, at it seems to deal with tweaks on wordings, not functional differences. Of course, the latter might be handled by the software.
This template does not know what kind of device the user is using. I don't know how much tweaking the software does when the ordinary site is used by smartphone users or the other way round (hopefully very little). Anyway, to add functionality inside this kind of template to get around bugs in the normal handling of mobile devices requires quite deep knowledge on what those bugs are and why they haven't been fixed for the general case.
The original need, I think, was to provide mobile users with a smaller file than desktop users. The desktop user may however be on a mobile net, using their smartphone as router, or may otherwise have restricted resources. My Firefox has deficient zooming facilities, so the smartphone version would be good for me, avoiding my having to open the map in a separate image viewing application (which shouldn't be a big deal, but still).
–LPfi (talk) 09:31, 23 March 2022 (UTC)
- The template provides alternative content depending on whether one is viewing the desktop rendering or the mobile rendering. As we are probably all aware, the mobile rendering is less than optimal with some relatively complicated formatting, and there is no way of knowing when or if it will be fixed. I have been trying to implement some good suggestions for a star nomination, and ran into some of these issues. If I can use this function I can provide the best version for desktop, and the best version for mobile, depending on which the user chooses to use. I got the impression that the template does not know what device is in use, it just sends content based on which site is being used (mobile or default) From what little I understand of it, it chooses css based on the site and just suppresses the content of the unwanted/unsuitable part, but what I know about css is extremely little, maybe just enough to be confusing, which is why I was hoping for comment from Evad37, who created the template and would probably know how simple or complex it would be to import. I seldom use my smartphone for browsing, really only to check rendering of Wikipedia and Wikivoyage articles, but I use a tablet a lot – in desktop mode, because mobile frustrates the hell out of me. However, almost all of the people I know who use the dive site articles do it on their phones on mobile, often on a boat at sea, so falling back to a laptop or desktop is not an option. Cheers, • • • Peter (Southwood) (talk): 11:52, 23 March 2022 (UTC)
- Andyrom75, it is in connection with a problem familiar to you, The issue of map toggling between static and dynamic which does not happen on mobile, and the alternative image cannot be linked from the map caption either, so I end up with two maps to get it to work. Not a total train-smash, but it would be nice to use the more elegant solution. Cheers, • • • Peter (Southwood) (talk): 12:05, 23 March 2022 (UTC)
- Just to make a long story short: the content can be formatted according to the used view (mobile/desktop) or according to the actual size of the screen, changing the project Mediawiki pages or the templatestyles of a specific template/module.
- Pbsouthwood, that said, if the issue we want to solve is just the map, I can figure out a specific tweak for that; keeping in mind that toggling effect (a Javascript feature) can be solved only server side by WMF, not client side by us. So what I need to know is exactly "which is the specific problem". --Andyrom75 (talk) 14:34, 23 March 2022 (UTC)
- @Johanna Strodt (WMDE), do you want to hear about this kind of map problem in your survey? WhatamIdoing (talk) 16:11, 23 March 2022 (UTC)
- Johanna Strodt (WMDE), WhatamIdoing, we were talking about phabricator:T111565 that is not related to map, but if you could fix it, you would have our endless gratitude :-P --Andyrom75 (talk) 17:04, 23 March 2022 (UTC)
- Andyrom75, If it is going to be a specific tweak for a specific page, it makes sense to to take that discussion to the talk page of the article. I will ping you from there for your convenience. Cheers, • • • Peter (Southwood) (talk): 16:58, 23 March 2022 (UTC)
- If it works as desired I will eventually want to use the tweak for a couple of hundred other dive sites, but if necessary I can copy and paste my way through. • • • Peter (Southwood) (talk): 17:25, 23 March 2022 (UTC)
- Andyrom75 I pinged you from Talk:Diving the Cape Peninsula and False Bay/Whittle Rock#The map. I don't know if you got the notification. • • • Peter (Southwood) (talk): 08:01, 25 March 2022 (UTC)
- @Andyrom75@WhatamIdoing: Thanks for the pointer. Yes, we'd appreciate this input in the survey. Thank you to everyone who is taking part, and to you, @WhatamIdoing, for creating some buzz around it! -- Johanna Strodt (WMDE) (talk) 08:11, 25 March 2022 (UTC)
- Johanna Strodt (WMDE), WhatamIdoing, we were talking about phabricator:T111565 that is not related to map, but if you could fix it, you would have our endless gratitude :-P --Andyrom75 (talk) 17:04, 23 March 2022 (UTC)
- @Johanna Strodt (WMDE), do you want to hear about this kind of map problem in your survey? WhatamIdoing (talk) 16:11, 23 March 2022 (UTC)
Sorry that I'm getting back to this later, but I think the solution is that users specifically click on "Mobile view" at the bottom of every page or just type in "https://m.en.wikivoyage.org/wiki/foo". —Justin (koavf)❤T☮C☺M☯ 18:35, 23 March 2022 (UTC)
- Solution to what? I for one only do that if I want to see what a mobile user will see to check that the page is rendering usefully and without too many surprises. If using a mobile phone, which is what most of the readers of my dive site articles do, most of them don't even know there is a choice, and desktop view is debatably even worse on such a small screen. Cheers, • • • Peter (Southwood) (talk): 09:25, 24 March 2022 (UTC)
- Oh, sorry, I misunderstood how it worked. You can freely ignore me. —Justin (koavf)❤T☮C☺M☯ 15:48, 24 March 2022 (UTC)
After discussed with Peter (Southwood), the first step to solve the above issue is to modify the template in the subject to adapt its output to the used skin (the WM skin is associated to the view mode hence to the device: mobile/desktop).
An example of how work the modified version can be seen at Diving the Cape Peninsula and False Bay/Whittle Rock.
If approved, I'll copy the sandbox in the official template to apply this behavior to all the articles (some test are required by anyone to be sure that everything is fine). --Andyrom75 (talk) 10:05, 31 March 2022 (UTC)
- The current difference (as of writing) seems to be adding "nomobile" to the classes of two sections and adding a new "mf-mobile-only" section, to be shown instead of those sections. If I guess at the effect correctly, it seems to be a sensible way to code it. I cannot judge whether it works as intended. Do I understand correctly, that the smaller resolution map is shown for everybody? Then to get to the print-size one, one would have to click through to Commons and check the "other versions" field in the description. –LPfi (talk) 11:09, 31 March 2022 (UTC)
- (The result of a diff between two pages is more than a little confusing if you try to check the context. Don't worry. –LPfi (talk) 11:12, 31 March 2022 (UTC))
- [ec] I will describe my experience, Andyrom75, please check that this is what you get too.
- As far as I can tell, the same static map is displayed on both desktop and mobile, at the widths specified in pixels as parameters in the template. They can be the same width or different, if I remember correctly, default is 350px. This is following the original template quite closely.
- In desktop, if you click on the static map it opens, at the specified width, and if you click again it opens in full resolution. This is adequate, intuitive, and there are no surprises. If you click on the message in the caption the dynamic map opens, The parameters allow centering and zoom of the dynamic map. It shows the markers defined on the page. I do not know if you can select classes of marker to show or not show, like listing, see, do, etc as I have not needed to try.
- In mobile, only the static map is displayed, at the width specified for mobile at low resolution. I think this is normal. The caption does not offer the option of clicking to toggle with the dynamic map, as mobile does not support toggling. The compromise is reasonable and accepts current reality. Maybe one day it can work better, but that appears to need a Mediawiki fix, and for now this seems the reasonably practicable option. If you click on the static map it opens a larger thumbnail which can be zoomed in the normal way, but clicking on it again appears to do nothing, and does not open a larger file. To get to the highest resolution it is necessary to go to commons via the "Details" button, select the higher resolution you want, and open it in commons. In some cases, maybe most cases, the larger thumbnail will be big enough to zoom in to the details one needs, and when this is the case the modification seems to be an adequate improvement and fit for use. There are edge cases when the full resolution is needed, and Andyrom75 has offered to draft a separate template for those cases once this version is settled. This proposed template will be useful for dive site maps, where a lot of detail may be included in the static map, which therefore needs to be opened at high resolution to make the text legible, but some of the other features of Template:Regionlist are not needed.
- Where the limitation on mobile image size is acceptable, the sandbox version seems to be a good compromise, but I have not tested all the optional functionality, which does not apply to my use case, and which is one of the reasons for opening this discussion. More eyes may identify other bugs, or confirm that the sandbox template is fit for general use. Cheers, • • • Peter (Southwood) (talk): 12:08, 31 March 2022 (UTC)
- Peter (Southwood), your resume is correct. Up to the end of April I will have very limited time, so, if there's no objection I can "put in production" the sandbox, but I won't be able to monitor how it works nor to quickly fix any potential issue.
- Let's be sure that someone else can act on my behalf or revert this template change. That's said, let me know (pinging me) if I can proceed. --Andyrom75 (talk) 10:35, 8 April 2022 (UTC)
- Andyrom75 It should be simple enough to revert if there is any problem. I could do that if necessary, as could several others. I don't know if we will get any more feedback, and in view of ease of revert maybe you should just go ahead if there is no further comment within 24 hours. Cheers, • • • Peter (Southwood) (talk): 14:38, 8 April 2022 (UTC)
`regionInteractiveMap` should display interactive map if `regionmap` param not supplied
[edit]I was just trying to add a districts section to Venice and discovered you must supply a static map in order to show the dynamic map. I don't have time to make a static map, so I was hoping to use only the dynamic one. To reproduce, copy this [1] into a new page and delete the regionmap param. I see no map, and would expect to see a dynamic map. It's probably not possible for whatever reason, but it would be nice to have. ButteBag (talk) 15:17, 7 July 2022 (UTC)
- Ah so I figured out you can add templates like in Barcelona or Venice. Still, eventually it would be nice to have a standardized approach. --ButteBag (talk) 14:31, 29 July 2022 (UTC)
- @ButteBag: My advice would be having a separate map. Maybe see Canberra/Weston Creek, Molonglo Valley and Woden or Special:PermaLink/4473176 (this one used to have a dynamic map before I made a static map) for a bit of an idea as to what I'm talking about. As for why this issue occurs, the template's default is to use a static map and this (sadly) cannot be changed. SHB2000 (talk | contribs | meta.wikimedia) 03:34, 30 July 2022 (UTC)
Capped at 20
[edit]Why is the template capped at 20. I was making a template with 22 regions and the last two do not show. can we extend the maximum number of regions to 30 or 40 to give people more options 203.49.228.129 04:10, 23 May 2023 (UTC)
Parsoid compatibility
[edit]To ensure Parsoid compatibility with this template, we suggest the following edit: https://en.wikivoyage.org/w/index.php?oldid=4826574&diff=4915944
This way, both toggleable elements have distinct IDs (which they should), and their ID does not get overwritten by Parsoid. IHurbainPalatin (WMF) (talk) 15:12, 2 August 2024 (UTC)
switch to interactive map does not work
[edit]I just discovered that the link "switch to interactive map" of a Regionlist does not show a map, and the static map disappears. FredTC (talk) 11:12, 1 August 2024 (UTC)
- On it:voy still works (e.g. it:Slovacchia), so the problem is only in en:voy. Unfortunately I'm about to go on vacation and I can't debugging it in the short term. The problem is on the new parser (Parsoid), because if you switch on the legacy parser (see link on the left bar), everything works correctly. Andyrom75 (talk) 15:44, 1 August 2024 (UTC)
- @Jdlrobson: Could you perhaps take a look into this when you get the time? Thanks in advance. --SHB2000 (t | c | m) 23:16, 1 August 2024 (UTC)
- I can replicate this, but I'm not familiar with this gadget. What is the gadget that adds that link? Jdlrobson (talk) 02:14, 2 August 2024 (UTC)
- https://en.wikivoyage.org/w/index.php?title=Template:Regionlist&diff=prev&oldid=4073000 ... it's basically using the mw-collapsible , which in turn does some jQuery magic to switch stuff... -- andree 10:46, 2 August 2024 (UTC)
- I can replicate this, but I'm not familiar with this gadget. What is the gadget that adds that link? Jdlrobson (talk) 02:14, 2 August 2024 (UTC)
- @Jdlrobson: Could you perhaps take a look into this when you get the time? Thanks in advance. --SHB2000 (t | c | m) 23:16, 1 August 2024 (UTC)
- Hi @FredTC - could you provide an example of a page where this happens, so that we can investigate and fix? Thanks! IHurbainPalatin (WMF) (talk) 15:58, 1 August 2024 (UTC)
- @IHurbainPalatin (WMF) Slovakia... Andyrom75 (talk) 21:23, 1 August 2024 (UTC)
- I noticed it with Amsterdam, but I also tried other ones with the same result. I also tried it with another browser, not logged in. All with the same result. FredTC (talk) 06:37, 2 August 2024 (UTC)
- After investigation: https://www.mediawiki.org/wiki/Manual:Collapsible_elements#With_custom_toggle_link uses "id" attributes to have remote/custom toggles on elements. This is not going to work out in a Parsoid environment, because the id will be overwritten. Please bear with us while we figure out how we're going to support that! IHurbainPalatin (WMF) (talk) 10:58, 2 August 2024 (UTC)
- I opened https://phabricator.wikimedia.org/T371682 to track this. IHurbainPalatin (WMF) (talk) 11:07, 2 August 2024 (UTC)
- From our perspective, this should be fixed with the following edit on the Regionlist template: https://en.wikivoyage.org/w/index.php?oldid=4826574&diff=4915944
- (I've added it there as well: Template talk:Regionlist#Parsoid compatibility)
- I thought that Parsoid was always overwrite the id attribute of the elements, but it was pointed out to me that it only happens if the ID is not unique. Hence, de-duplicating the ID should do the trick. IHurbainPalatin (WMF) (talk) 15:16, 2 August 2024 (UTC)
- @IHurbainPalatin (WMF), it's good to hear from you again. You should be able to edit that template directly. WhatamIdoing (talk) 16:11, 2 August 2024 (UTC)
- @WhatamIdoing likewise! Let me try that, then (I didn't want to overstep boundaries :D ) IHurbainPalatin (WMF) (talk) 16:19, 2 August 2024 (UTC)
- I don't think this community has ever objected to someone fixing known bugs.
;-)
We are practical here (and one of the nicest editing communities out there. Volunteer-you should drop by and update an article or two again). I'd have implement your change myself, except that I hadn't tried to reproduce the bug, so I wasn't sure that I'd be able to test that it was fixed. WhatamIdoing (talk) 16:37, 2 August 2024 (UTC)
- I don't think this community has ever objected to someone fixing known bugs.
- @WhatamIdoing likewise! Let me try that, then (I didn't want to overstep boundaries :D ) IHurbainPalatin (WMF) (talk) 16:19, 2 August 2024 (UTC)
- @IHurbainPalatin (WMF), it's good to hear from you again. You should be able to edit that template directly. WhatamIdoing (talk) 16:11, 2 August 2024 (UTC)
- I went ahead and edited the template. I believe the issue is fixed. Let me know if there's anything that doesn't look right! Thank you for your report and your patience :) IHurbainPalatin (WMF) (talk) 16:28, 2 August 2024 (UTC)