Page MenuHomePhabricator

Don't show "hand" mouse icon on unclickable objects
Closed, ResolvedPublic

Description

Any GeoJSON object that has no title/description should keep the original mouse pointer account. Currently all extra layer objects, even when they cannot be clicked, show a hand icon.

Original: On masked areas, a link/pointer mouse cursor is now shown instead a grab/grabbing cursor. There is no link available.

Event Timeline

Yurik added a subscriber: JGirault.

This is not actually mask-related, because Kartographer doesn't even have a concept "mask" - it's a regular polygon used by wikivoyage that has a second polygon in it that creates a hole.
To rephrase, we should not show hand cursor on any object that cannot be clicked (e.g. because it has no title and no description). Should be fairly easy to do, but this might be an upstream (mapbox js) change.

Yurik renamed this task from <maplink> and/or <mapframe>: Wrong mouse cursor symbol on masked areas to SimpleStyle should not show "hand" mouse icon on unclickable objects.Jul 27 2016, 6:43 AM
Yurik triaged this task as Medium priority.
Yurik updated the task description. (Show Details)

I have issued an upstream patch to the mapbox.js repository, that would fix the issue:
https://github.com/mapbox/mapbox.js/pull/1217

Let's follow up with these folks. We can always use my fork if they don't approve the patch.

JGirault added a project: Maps-Sprint.
JGirault moved this task from Backlog to Needs review on the Maps-Sprint board.
JGirault moved this task from Needs review to Stalled/Waiting on the Maps-Sprint board.
debt moved this task from Stalled/Waiting to Backlog on the Maps-Sprint board.
debt added a subscriber: debt.

Moving to backlog until such time that we can take this up again.

Not sure if there is work still to be done on this; however, moving off the sprint board as the Discovery team won't be able to finish this work at this time.

@Yurik happen to remember the page/map frame that triggered this bug ? Then I can test and check if it's still a problem now.

jmatazzoni lowered the priority of this task from Medium to Low.Feb 27 2018, 12:03 AM
jmatazzoni renamed this task from SimpleStyle should not show "hand" mouse icon on unclickable objects to Don't show "hand" mouse icon on unclickable objects.Feb 27 2018, 10:26 PM

Change 420641 had a related patch set uploaded (by Mooeypoo; owner: Mooeypoo):
[mediawiki/extensions/Kartographer@master] Use the 'grab' cursor rather than 'pointer' cursor as default

https://gerrit.wikimedia.org/r/420641

In full screen, the map uses the open-hand 'grab' icon, which requires some fallbacks. We use this in OOUI with icon fallbacks, but I am not 100% sure we need to go as far here, especially since the full-screen implementation in Leaflet "just" uses the vendor rules. (See OOUI demo of the draggable elements for context)

OOUI's cursor fallback is

cursor: url(images/grab.cur );

With the grab.cur and grabbing.cur as literal image files for the two cursors.
It might be an overkill to use these here, especially considering Leaflet only does the vendor corrections on full screen, but it's worth noting those exist and browser support might be missing without them.

For the sake of consistency, I'm changing the cursor to the same one Leaflet uses for the full-screen display.

Change 420641 merged by jenkins-bot:
[mediawiki/extensions/Kartographer@master] Use the 'grab' cursor rather than 'pointer' cursor as default

https://gerrit.wikimedia.org/r/420641

Checked in testwiki (wmf.26) -

Screen Shot 2018-03-21 at 8.17.39 PM.png (390×442 px, 294 KB)

Screen Shot 2018-03-21 at 8.18.07 PM.png (385×450 px, 297 KB)

Compare with the pointing hand currently in wikivoyage (wmf.25)

Screen Shot 2018-03-21 at 7.59.53 PM.png (505×516 px, 346 KB)

QA recommendation: Resolve.

A related comment was recently left on mw.org. Perhaps this should be reviewed?

https://www.mediawiki.org/wiki/Topic:Ubcqx31vbvfr0sbp

A related comment was recently left on mw.org. Perhaps this should be reviewed?

https://www.mediawiki.org/wiki/Topic:Ubcqx31vbvfr0sbp

Thanks Chris. Elena shows this task has having been completed. I put a note in the discussion letting the user know and asking him to let us know if he's still seeing the problem.

@CKoerner_WMF and @jmatazzoni Actually, the issue has been confirmed on testwiki. It relates to using "type": "ExternalData". In betalabs, maps with this type are failed to be displayed with the Console error:

jQuery.Deferred exception: Cannot set property 'dataGroup' of undefined TypeError: Cannot set property 'dataGroup' of undefined at ExternalGroup.

I filed it as a separate issue T192613: maps with "type": "ExternalData" have pointing hand mouse pointer over unclickable objects and updated the topic https://www.mediawiki.org/wiki/Topic:Ubcqx31vbvfr0sbp - added the ticket number.