MediaWiki talk:Gadget-mobilemaps.js

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Mobile.js runs on Vector too[edit]

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)[reply]

@Jdlrobson: any idea why this doesn't work at all ? —TheDJ (talkcontribs) 11:50, 12 July 2018 (UTC)[reply]
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 (talkcontribs) 12:03, 12 July 2018 (UTC)[reply]
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:T199478TheDJ (talkcontribs) 21:32, 12 July 2018 (UTC)[reply]

Zoom level countries[edit]

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)[reply]

The authors of those pages had not specified zoom levels. —TheDJ (talkcontribs) 00:17, 22 August 2017 (UTC)[reply]

Opens the map everywhere on Firefox[edit]

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)[reply]

Fixed. —TheDJ (talkcontribs) 11:36, 12 July 2018 (UTC)[reply]

Changes to Minerva mobile menu[edit]

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)[reply]

JDrewniak (WMF), done —TheDJ (talkcontribs) 12:08, 10 March 2019 (UTC)[reply]

Color of map icon slightly off[edit]

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)[reply]

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 (talkcontribs) 07:31, 15 January 2020 (UTC)[reply]
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)[reply]
AHollender (WMF), correct. the variant would need to be defined at the resourceloader level. —TheDJ (talkcontribs) 21:26, 23 January 2020 (UTC)[reply]

Interface-protected edit request on 15 January 2020[edit]

Please replace with the version from User:TheDJ/mobilemaps.js (changes). This deals with phab:T240644. —TheDJ (talkcontribs) 07:13, 15 January 2020 (UTC)[reply]

 Done thank you for the update TheDJ. — xaosflux Talk 14:04, 15 January 2020 (UTC)[reply]
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)[reply]
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 (talkcontribs) 10:41, 27 January 2020 (UTC)[reply]
 Donexaosflux Talk 14:27, 31 January 2020 (UTC)[reply]

Interface-protected edit request on 14 March 2020[edit]

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)[reply]

@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)[reply]
@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)[reply]
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)[reply]
Oshwah, it's only active on mobile (targets=mobile). I approve of this change (it was already on my today list honestly. —TheDJ (talkcontribs) 11:52, 16 March 2020 (UTC)[reply]
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)[reply]

Interface-protected edit request on 9 October 2023[edit]

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)[reply]

 Done * Pppery * it has begun... 22:29, 10 October 2023 (UTC)[reply]