The nearby page is a little confusing. It requests users location right away before they can work out if they want to do that.
- Provide a purpose of the feature to the user, to set expectation of what happens when they give location permission
- Location permission CTA should be an explicit consent
On first page load there should be a text telling the user to allow the browser to share the location with the site. T120520 is similar, but this point is a little different. This is a call to action asking the user to share their location. The aforementioned task is a general intro about the page (I think).
Empty state: zpl.io/V1ZpdZ5
Copy for confirmation/error message: You have denied access to Location Services for “https://en.m.wikipedia.org”. To change this please visit your browser or device settings.
- When the user has an old browser or is not running JS, the "show nearby articles" button will be disabled.
- On a first visit 3 clicks to get to nearby results (1: click menu item, 2: click button, 3: give browser permission).
- On a second visit it would be 2 clicks (steps 1 and 2).
- A geolocation permission warning is _not_ printed to the console:
[Violation] Only request geolocation information in response to a user gesture. https://en.m.wikipedia.org/w/extensions/MobileFrontend/resources/mobile.nearby/Nearby.js?38c95 getCurrentPosition @ Nearby.js?38c95:93 refresh @ Nearby.js?38c95:265 Nearby @ Nearby.js?38c95:32 refresh @ nearby.js?0c69a:69 refreshCurrentLocation @ nearby.js?0c69a:103 matchRoute @ oojs-router.js?f0f4f:29 (anonymous) @ oojs-router.js?f0f4f:94 each @ load.php?debug=true&…version=09gt2zl:368 Router.checkRoute @ oojs-router.js?f0f4f:93 (anonymous) @ nearby.js?0c69a:115 mightThrow @ load.php?debug=true&…ersion=09gt2zl:3583 process @ load.php?debug=true&…ersion=09gt2zl:3651
Previous history of this task
We fixed the following things:
- Upon visiting https://en.m.wikipedia.org/wiki/Special:Nearby you'll see a permission dialog to access your location. If you block or ignore the dialog you'll keep seeing the spinner in the middle of the page. When blocked, there should be some text informing the user about it.
- Similarly on the desktop site the text "Loading..." shows but never disappears. The hidden class applies but there is no equivalent css rule to hide this on desktop.
- Use mw-ui-icon and mw-ui-icon-large
- @Nirzar to add asset