codeforhuntsville / Frontier

A civic app for finding whats near me
http://codeforhuntsville.com/
MIT License
9 stars 7 forks source link

As a user, I'd like to click/touch a button to give my location #39

Open chrisbeaman opened 9 years ago

chrisbeaman commented 9 years ago

Description

We would like to provide a location button that gives the app the user's location when the user touches/clicks it.

Definition of Done

See example: Click the location button in this wireframe: http://lrdy2r.axshare.com/#p=home

Technical Details

Wireframe: http://lrdy2r.axshare.com/#p=home

In this wireframe, the "give location" button is to the right of the input box containing the words "Enter an address"

The user would touch/click this button and the app would get the user's location via some native function of their device, or some other mechanism. You'd need to figure out how to achieve this for Apple iOs, Android, Chrome, Firefox, Internet Explorer, Safari, etc. Is there a single method that works for all browsers/OS'?

dannagle commented 9 years ago

This happens on initial load. Most browsers remember if you've given consent. I suppose a button could be added to re-trigger the share location prompt. I don't normally see that.

chadxz commented 9 years ago

Giving consent is only "remembered" when visiting the page via https. If we want to delay requesting consent until the user presses a ui button, it would be trivial to do, as the request for consent doesn't actually happen until we try to get the location via the api.

dannagle commented 9 years ago

My Chrome for Android and Opera on desktop remembered consent on the prototype, and it is not https. Firefox has a pop-up asking to always grant consent or just once. Regardless, this can be easily moved to a button.

dustywusty commented 9 years ago

the value proposition of the location button is less about giving initial consent and more about updating your position after having moved about with a mobile device

eg.

  1. i've used the button once and found things around me
  2. i put mobile safari in the background, bc i'm taking a phone call
  3. i now walk a mile down the street
  4. i bring mobile safari back into the foreground
  5. i want to see what is around with me without refreshing the entire page
dannagle commented 9 years ago

App could periodically poll your location and then update itself without interaction. I know Android UI guidelines frown upon refresh buttons.

I'll add a button. We've debated this longer than it takes to add it. It makes debug easier. If we eventually don't need it, we can hide it.