Page MenuHomePhabricator

Update Places Map Zoom Logic to always show a marker
Closed, ResolvedPublic

Description

Background
Usability testing and survey results confirmed that users are confused when opening the app when there were no map markers as a result of articles not being in close proximity to the user.

Task
Update logic so that on first launch of the Places feature the map zoom shows the closest map marker to the user.

For cases where there is no map marker nearby, show this error message in a snackbar:

copyThere are no nearby articles. Try zooming out and moving the map.
mockup
image.png (1×720 px, 240 KB)

APK:
https://github.com/wikimedia/apps-android-wikipedia/pull/4789

Event Timeline

cooltey added a subscriber: AlexHollender-WMF.

Hi @AlexHollender-WMF

This is ready for the design review, please follow the following instructions to test the changes, you can download the APK from ticket description.

  1. Make sure your Developer mode is on: Go to About in Settings and click on the wiki globe logo 10 times to enable the developer mode.
  2. In the Developer settings, find "placesDefaultLocationLatLng" and "clearLastLocationAndZoomLevel"

Screenshot_20240708_164819_Wikipedia Dev.jpg (2×1 px, 102 KB)

  1. If your actual location does not show nearby markers, you will not need to set a default location; otherwise, you need to set a default location that does not have nearby markers available in order to check the changes (you can use the location in the dialog message.
  2. Click on "clearLastLocationAndZoomLevel" to reset it, this helps you to the initial status of the first launch on Places.

Please let me know if you need any help to test the changes!

@cooltey I'm not sure if I'm doing something wrong, but as far as I can tell this is not working as expected.

Precise location

Map viewList view
Screenshot_20240711-164832.png (2×1 px, 201 KB)
Screenshot_20240711-164835.png (2×1 px, 97 KB)

Approximate location

Map view
Screenshot_20240711-164721.png (2×1 px, 362 KB)

When I set placesDefaultLocationLatLng to the value in the dialog, this is what I see:

Precise location

Map viewList view
Screenshot_20240711-165949.png (2×1 px, 672 KB)
Screenshot_20240711-165953.png (2×1 px, 69 KB)

Approximate location

Map viewList view
Screenshot_20240711-170144.png (2×1 px, 673 KB)
Screenshot_20240711-170148.png (2×1 px, 71 KB)

Hi @AlexHollender-WMF

I'm not sure if I'm doing something wrong, but as far as I can tell this is not working as expected.

Did you click on clearLastLocationAndZoomLevel to reset the saved last location before testing the fix? This will help you to simulate the condition of first launching Places to see the fix.

Please follow this demo video to see if this walkthrough works for you: https://youtube.com/shorts/faC1unI36MI

@cooltey following the example in the demo video I had the same result as you. However when I tried a more remote location (65.228589,-105.960481), the map did an animated zoom out, and then landed here:

Screenshot_20240715-123730.png (2×1 px, 273 KB)

which does not seem to match the requirement.

Hi @AlexHollender-WMF
Thanks! I have another solution for this issue since the zoom out solution does not fit for every case: we can navigate the map to a default location such as San Francisco City Hall for the first-time launch if the current area does not have markers on the map, see the video below:

https://www.youtube.com/shorts/PV0GESBdUbY

This would reduce the complexity of finding available nearby articles in your current area, especially for the more remote locations like the one you provided.

@JTannerWMF any thoughts on this?

I rather the default (if we have to go this route) be the Wikimedia Foundation if no article is detected, just so we aren't being too geographically biased.

The WMF headquarters is still quite geographically biased: it’s still in San Francisco, California, a huge Western city; probably not something a user from Southeast Asia or the Sub-Saharan Africa (or even Europe, for that matter) would look for.

I know it’s much more complicated, but a significantly better solution would be finding something nearby (maybe the capital of the country the user is in, or the capital of a random neighboring country if not even the capital of the current country has anything).

@AlexHollender-WMF lets work on a design to throw up a message to users to let them know no articles were detected near them and that they need to zoom out.

Thanks, that’s a good idea! It’s not as eye-catching as the zooming out/moving away, but probably more useful for the users, and not geographically biased at all (apart from the unavoidable bias that some places have more geocoded articles than others).

@AlexHollender-WMF lets work on a design to throw up a message to users to let them know no articles were detected near them and that they need to zoom out.

I've added the mockup to the task description

Hi @AlexHollender-WMF

This is ready for review again. Please download the APK from the ticket description to see the changes, thanks.

Please make sure to go to the Developer settings -> "clearLastLocationAndZoomLevel" in the Miscellaneous section before testing, since it shows only at the first launch of the feature.

copyThere are no nearby articles. Try zooming out and moving the map.

Why not Try zooming out or moving the map? Either should suffice to find a nearby article eventually.

Hi @AlexHollender-WMF

This is ready for review again. Please download the APK from the ticket description to see the changes, thanks.

Please make sure to go to the Developer settings -> "clearLastLocationAndZoomLevel" in the Miscellaneous section before testing, since it shows only at the first launch of the feature.

@cooltey I can't replicate the state from last time where I was using a more remote location (65.228589,-105.960481) because I can't find the "placesDefaultLocationLatLng" in Developer Settings:

Screenshot_20240729-154011.png (2×1 px, 208 KB)

However by denying location access then zooming in I did see this, which is close to the mockup but is missing persistence + a close button:

Screenshot_20240729-153551.png (2×1 px, 446 KB)

@JTannerWMF something I noticed while testing this, if you deny location access this is what you see:

Screenshot_20240729-153332.png (2×1 px, 363 KB)

I wonder if this could be improved:

  • I think "Please try again" means "Open the places feature again to get re-prompted for location permission", but I'm not sure that's clear
  • People can use the feature without location turned on, so instead of this sort of dead-end message the alert could say something like: "Zoom into your location on the map to see articles about places near you. Allowing location permission makes Places easier to use — you will be prompted for permission again next time you open Places."
  • This alert dismisses itself, so it's possible people won't see it before it goes away
  • Once the alert is gone, you can see the blue locator button in the bottom-right corner. If you press it the same alert appears:

Screenshot_20240729-153452.png (2×1 px, 492 KB)

Not sure if it's possible, but showing the location permission prompt again (rather than the alert) might make more sense?

copyThere are no nearby articles. Try zooming out and moving the map.

Why not Try zooming out or moving the map? Either should suffice to find a nearby article eventually.

I thought about and vs. or — while zooming or moving will eventually result in finding a place, I think doing a bit of both together is the fastest/easiest way to find a place.

Hi @AlexHollender-WMF

Please download the APK from the ticket description to see the changes, thanks!

@cooltey I can't replicate the state from last time where I was using a more remote location (65.228589,-105.960481) because I can't find the "placesDefaultLocationLatLng" in Developer Settings:

Screenshot_20240729-154011.png (2×1 px, 208 KB)

Sorry, I added it back and now you can set a default location in the developer settings.

However by denying location access then zooming in I did see this, which is close to the mockup but is missing persistence + a close button:

Screenshot_20240729-153551.png (2×1 px, 446 KB)

Added.

Not sure if it's possible, but showing the location permission prompt again (rather than the alert) might make more sense?

Regarding the permission prompt, it looks like the Android system side does not allow the app to prompt the permission dialog again after the user denied it two times: see here.

I would recommend showing another snackbar message saying that you can go to the app settings to turn on the location permission.
cc @JTannerWMF

copyThere are no nearby articles. Try zooming out and moving the map.

Why not Try zooming out or moving the map? Either should suffice to find a nearby article eventually.

I thought about and vs. or — while zooming or moving will eventually result in finding a place, I think doing a bit of both together is the fastest/easiest way to find a place.

I feel the “and” wording means that the user most do both, while the “or” means that the user can do either one or both – “or” is the word for disjunction, not for XOR (that would be “Try either zooming out or moving the map”).

Looks good to me

Screenshot_20240808-102011.png (2×1 px, 751 KB)

The snackbar was not always appearing when I expected it to, but I will leave that for QA

Looks good to me

Screenshot_20240808-102011.png (2×1 px, 751 KB)

The snackbar was not always appearing when I expected it to, but I will leave that for QA

Thanks, @AlexHollender-WMF. the current logic to show the snackbar is: first launch of Places and does not have the last coordinates saved in the app.