Closed OrenShalev closed 4 years ago
Hi Oren, thanks for the idea!
Initially this was the behavior, but I was afraid of a UX issue this could raise; we need to build a minimal user trust before asking them for their location. If a permission request will be shown before they saw an explanation why is it happening, it can bring up suspicious thoughts in their minds which I think we prefer to avoid. The current method allows them to give their location out of their free will, by clicking a button that makes it clear why the permission alert shows up.
But I'm open to hear other thoughts!
Hi Guy,
So a solution here might be "once the user asked to use location, remember that they did that, and in the future focus on load." A relatively simple way to implement this would be saving this decision on localStorage.
I think that removing the modal on load makes sense for everyone.
But no pressure. :) It's fine to drop this if no enthusiasm.
I think showing not showing the modal for returning users is a good idea. It's a bit annoying that it pops up everytime
So a solution here might be "once the user asked to use location, remember that they did that, and in the future focus on load." A relatively simple way to implement this would be saving this decision on localStorage.
Maybe instead of storing the decision in localStorage, we could save the address itself. Then there won't be the problem of using the location api without user confirmation.
That makes sense. Isn't the permission gets invalidated after a while and the permission alert shows up again?
@guytepper I don't think the permission is invalidated after a while. However, it could be revoked by the user (rare but happens).
So it seems like we want to save the user's last address/location?
I suggest to use the map's last location, as users can start with address or device location and then move the map. If we keep track of position changes (I guess when dispatching setMapPosition
?), I think it'll cover all cases.
If someone else wants to take a shot at it I have no objection. :)
👋 Hey! I created a PR that saves the chosen user location (coordinates) on local storage - https://github.com/guytepper/1km.co.il/pull/48
@guytepper the permission is not invalidated once allowed. Do you want the default location to be set to:
?
I would if user has set location then 2. If not then 1
@OrenShalev can you update the PR to follow @joeyede requirement (try to use users' last selected location, with fallback to users' current location, with fallback to modal) ?
Seems like #48 is merged and this bug is fixed, so closing. 👍
Thanks Oren!
On Sat, Oct 10, 2020, 16:58 Oren Shalev notifications@github.com wrote:
Closed #38 https://github.com/guytepper/1km.co.il/issues/38.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/guytepper/1km.co.il/issues/38#event-3862783194, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASM777OLBAIMT2CHHINHADSKBSBDANCNFSM4SFQDLDQ .
I believe most times the page is loaded, the user wants to see protests in their area. I think it would be better not to pop the modal every time the user loads the page, and instead focus the map according to the device's location. Now that there's a "change address" button, if the user intended to input an address -- they can do that with one click / tap.
If there's an agreement that this would be a good change, I can create the PR for it.