MediaWiki talk:Gadget-mobilemaps.js
Mobile.js runs on Vector too
I should point out that MediaWiki:Mobile.js will run on any skin operating in mobile mode. e.g. https://en.m.wikipedia.org/wiki/Spain?useskin=vector https://en.m.wikipedia.org/wiki/Spain?useskin=monobook
Also Minerva is now a desktop skin too, so you'll want it to run there too.
Thus, MediaWiki:minerva.js would be more appropriate.
Jdlrobson (talk) 22:25, 21 August 2017 (UTC)
- @Jdlrobson: any idea why this doesn't work at all ? —TheDJ (talk • contribs) 11:50, 12 July 2018 (UTC)
- OK, that was even scarier, apparently that made it work (after more than 10 minutes) on all desktop skins somehow. i guess specifying a target makes it ignore the skins filter or something ? weird.... —TheDJ (talk • contribs) 12:03, 12 July 2018 (UTC)
- Only `minerva` key should be needed. Maybe `minervaneue` triggered some differently handling. Note, I have no idea how gadgets work on mobile. I don't think anyone intentionally enabled them, so if they work it's by sheer luck and I wouldn't be surprised if they misbehaved. I'd recommend experimenting on beta cluster, isolate what causes it and raise a bug against the Gadgets extension. 19:24, 12 July 2018 (UTC)
- Grrr, found the problem phab:T199478 —TheDJ (talk • contribs) 21:32, 12 July 2018 (UTC)
- Only `minerva` key should be needed. Maybe `minervaneue` triggered some differently handling. Note, I have no idea how gadgets work on mobile. I don't think anyone intentionally enabled them, so if they work it's by sheer luck and I wouldn't be surprised if they misbehaved. I'd recommend experimenting on beta cluster, isolate what causes it and raise a bug against the Gadgets extension. 19:24, 12 July 2018 (UTC)
Zoom level countries
The map shows on country pages https://en.m.wikipedia.org/wiki/Spain and https://en.m.wikipedia.org/wiki/Japan is super zoomed in (as if looking at a city). Is this intended? It would be less jarring to be shown a zoomed out view (and maybe not a pin but a boundary for countries).
Jdlrobson (talk) 22:25, 21 August 2017 (UTC)
- The authors of those pages had not specified zoom levels. —TheDJ (talk • contribs) 00:17, 22 August 2017 (UTC)
Opens the map everywhere on Firefox
Hi,
When I use Firefox and this gadget is enabled, the map always opens, no matter where I click at the article. This is especially frequent when I tap on headings to expand them.
This happens in Firefox on Android and also in Firefox on desktop if I go to the mobile site.
It would very nice to get this fixed.
Thanks! (Tagging User:TheDJ.) --Amir E. Aharoni (talk) 11:00, 12 July 2018 (UTC)
- Fixed. —TheDJ (talk • contribs) 11:36, 12 July 2018 (UTC)
Changes to Minerva mobile menu
Hello,
The Readers Web team (well, me specifically) have recently been making some changes to the HTML structure of the mobile menu. These changes are not live on Wikipedia yet, but they will be soon and they're visible on the Wikipedia Beta site right now.
It looks like these changes will affect this gadget. The CSS selector used for Minerva $('.language-selector')
is still there, so the icon will still show up, but from my testing it looks like it'll overlap the language icon. I think this can be fixed by removing the float: left;
and changing the margin-left: -1em;
to margin-left: 1em;
on lines 214 of the code. Thanks, JDrewniak (WMF) (talk) 22:32, 5 March 2019 (UTC)
- JDrewniak (WMF), done —TheDJ (talk • contribs) 12:08, 10 March 2019 (UTC)
Color of map icon slightly off
Hey, I noticed that the color of the map icon is currently #717171, whereas the other icons in the mobile toolbar are #59545d (i.e. Base20 in the Wikimedia color system). Would it be possible to update the map icon to match? I am happy to provide a version of the map icon svg in the correct color if that would be helpful. Thanks. AHollender (WMF) (talk) 21:46, 6 June 2019 (UTC)
- AHollender (WMF), no, this is not possible, as I cannot create an icon variant (color) on the JS side. The icon needs to be serverside defined and by default there is no 'minerva gray' variant of an oojs ui icon. —TheDJ (talk • contribs) 07:31, 15 January 2020 (UTC)
- Ok, forgive my lack of understanding but what would need to happen in order for the icon to display in the correct color? We would need to update OOUI to include gray variants of icons? AHollender (WMF) (talk) 16:20, 23 January 2020 (UTC)
- AHollender (WMF), correct. the variant would need to be defined at the resourceloader level. —TheDJ (talk • contribs) 21:26, 23 January 2020 (UTC)
- Ok, forgive my lack of understanding but what would need to happen in order for the icon to display in the correct color? We would need to update OOUI to include gray variants of icons? AHollender (WMF) (talk) 16:20, 23 January 2020 (UTC)
Interface-protected edit request on 15 January 2020
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please replace with the version from User:TheDJ/mobilemaps.js (changes). This deals with phab:T240644. —TheDJ (talk • contribs) 07:13, 15 January 2020 (UTC)
- Done thank you for the update TheDJ. — xaosflux Talk 14:04, 15 January 2020 (UTC)
- I'm still seeing a render issue. I think the label of the element inside .mw-ui-icon also needs to be wrapped in a span? Jdlrobson (talk) 23:53, 15 January 2020 (UTC)
- No, it's because minerva thinks any link without an href is a menu. This change should take care of that. I also added a space in front of 'Map' just in case there is a screenreader user who run across this (and to align with minerva convention of such titles). If someone would be so kind to propagate? —TheDJ (talk • contribs) 10:41, 27 January 2020 (UTC)
- I'm still seeing a render issue. I think the label of the element inside .mw-ui-icon also needs to be wrapped in a span? Jdlrobson (talk) 23:53, 15 January 2020 (UTC)
- Done — xaosflux Talk 14:27, 31 January 2020 (UTC)
Interface-protected edit request on 14 March 2020
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please replace the code with User:BrandonXLF/sandbox/Gadget-mobilemaps.js. This adds a call to event.preventDefault to openTitleCoord to stop the page reloading when the map button in clicked. I've also use the normal function syntax for openTitleCoord and added padding for the parameters for setupKartographer. Deals with phab:T247664.– BrandonXLF (talk) 17:44, 14 March 2020 (UTC)
- @BrandonXLF: can you please make the update at User:BrandonXLF/sandbox/Gadget-mobilemaps.js first so there is a clean diff? Also, have you tested this yet? — xaosflux Talk 19:03, 14 March 2020 (UTC)
- @Xaosflux: I've made the update at User:BrandonXLF/sandbox/Gadget-mobilemaps.js (here's the diff). I tested the code in the JavaScript console.– BrandonXLF (talk) 19:09, 14 March 2020 (UTC)
- Would this change interfere with operations when using a non-mobile device? I'm wondering why this results in a reload only on mobile devices and not others (according to the phab ticket)... ~Oshwah~(talk) (contribs) 04:57, 16 March 2020 (UTC)
- Oshwah, it's only active on mobile (targets=mobile). I approve of this change (it was already on my today list honestly. —TheDJ (talk • contribs) 11:52, 16 March 2020 (UTC)
- TheDJ - Thank you for the information. Very well; I've implemented the requested changes from User:BrandonXLF/sandbox/Gadget-mobilemaps.js and onto this gadget page (diff). You should be all set to go. :-) ~Oshwah~(talk) (contribs) 12:00, 16 March 2020 (UTC)
- Oshwah, it's only active on mobile (targets=mobile). I approve of this change (it was already on my today list honestly. —TheDJ (talk • contribs) 11:52, 16 March 2020 (UTC)
- Would this change interfere with operations when using a non-mobile device? I'm wondering why this results in a reload only on mobile devices and not others (according to the phab ticket)... ~Oshwah~(talk) (contribs) 04:57, 16 March 2020 (UTC)
- @Xaosflux: I've made the update at User:BrandonXLF/sandbox/Gadget-mobilemaps.js (here's the diff). I tested the code in the JavaScript console.– BrandonXLF (talk) 19:09, 14 March 2020 (UTC)
Interface-protected edit request on 9 October 2023
It is requested that an edit be made to the interface page at MediaWiki:Gadget-mobilemaps.js. (edit · history · last · links)
This template must be followed by a complete and specific description of the request, that is, specify what text should be removed and a verbatim copy of the text that should replace it. "Please change X" is not acceptable and will be rejected; the request must be of the form "please change X to Y".
The edit may be made by any interface administrator. Remember to change the |
On L-210 replace #page-actions .mw-show-on-map
with #page-actions .mw-show-on-map, #p-views .mw-show-on-map
.
Once this weeks train rolls out the CSS ID will be changed on Minerva from #page-actions
to #p-views
[1]. This change ensures that the CSS in this gadget will roll over cleanly; once the train has settled the old selector can then be removed -- Asartea Talk | Contribs 14:53, 9 October 2023 (UTC)