Giter VIP home page Giter VIP logo

Comments (12)

guytepper avatar guytepper commented on June 8, 2024 1

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!

from 1km.co.il.

joeyede avatar joeyede commented on June 8, 2024 1

I would if user has set location then 2. If not then 1

from 1km.co.il.

OrenShalev avatar OrenShalev commented on June 8, 2024

Hi Guy,

  • For new users, I see your point.
  • For returning users, I think that focusing on their location is better.

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.

from 1km.co.il.

uriklar avatar uriklar commented on June 8, 2024

I think showing not showing the modal for returning users is a good idea.
It's a bit annoying that it pops up everytime

from 1km.co.il.

daganomri avatar daganomri commented on June 8, 2024

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.

from 1km.co.il.

guytepper avatar guytepper commented on June 8, 2024

That makes sense.
Isn't the permission gets invalidated after a while and the permission alert shows up again?

from 1km.co.il.

OrenShalev avatar OrenShalev commented on June 8, 2024

@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. :)

from 1km.co.il.

ranyitz avatar ranyitz commented on June 8, 2024

👋 Hey! I created a PR that saves the chosen user location (coordinates) on local storage - #48

from 1km.co.il.

webernir avatar webernir commented on June 8, 2024

@guytepper the permission is not invalidated once allowed.
Do you want the default location to be set to:

  1. Users' current location
  2. Users last selection (taken from localStorage)

?

from 1km.co.il.

webernir avatar webernir commented on June 8, 2024

@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) ?

from 1km.co.il.

OrenShalev avatar OrenShalev commented on June 8, 2024

Seems like #48 is merged and this bug is fixed, so closing. 👍

from 1km.co.il.

webernir avatar webernir commented on June 8, 2024

from 1km.co.il.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.