New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 637897 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug


Show other hotlists

Hotlists containing this issue:
Geolocation


Sign in to add a comment

Geolocation custom Lat/Lng number inputs have huge steps

Reported by m...@azimi.me, Aug 15 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Steps to reproduce the problem:
When entering new Lat Lang the number input buttons increment and decrement Lat/Lng by 1 which is too much! The number step input should be something like 0.00001

What is the expected behavior?

What went wrong?
Bad DX

Did this work before? N/A 

Chrome version: 52.0.2743.116  Channel: stable
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 22.0 r0
 
Cc: brajkumar@chromium.org
Labels: Needs-Feedback
Reporter@ - Could you please provide a manual repro steps to test this issue from Chrome_TE end. 

Comment 2 by l...@chromium.org, Aug 16 2016

Cc: chowse@chromium.org
Components: Platform>DevTools>UX
Labels: -Needs-Feedback
Owner: l...@chromium.org
Status: Untriaged (was: Unconfirmed)
Summary: Geolocation custom Lat/Lng number inputs have huge steps (was: Geolocation custome Lat/Lng number inputs have huge steps)
Thanks for the report!  I assume that you mean using the arrow keys when focused in the lat/long inputs in the Sensors drawer has a larger step size (1) than you want.

The step size of 1 might be appropriate for some use cases and not others, depending on the scale you are interested in.  Perhaps a better way to suit any scale is to have a small map in the Sensors drawer that could be panned and zoomed?  I'd like to know if this would suit your use case, and if this ticket receives more stars.

Comment 3 by m...@azimi.me, Aug 19 2016

Yes! A Map would be amazing to have! Also ability to upload a GPX file to simulate movement and speed would be awesome++! 

Step size of 1 is too large for many cases. For example this is San Francisco 37.7567005,-122.431078. Moving lng by one, changes the map to near Santa Rosa! Usually people don't want to move the location that much. 

Comment 4 by chowse@chromium.org, Aug 19 2016

It sounds like you're using the increment/decrement to simulate movement. Are you using it in tandem with navigator.geolocation.watchPosition (or something else that periodically requests the user position)?

It seems reasonable to make the lat/lng step something smaller, like 0.001 (which, according to http://www.movable-type.co.uk/scripts/latlong.html is roughly 10m at the equator), if it's being used to simulate walking/biking/driving. We probably want the step to roughly match the granularity of what the Geolocation API gives us (so, if watchPosition would only give you an updated location every km, we would probably limit the step to 0.01). @luoe: Is this something you could look into?

I really like the idea of using a GPX file or a map to simulate movement, but adding (non-manual) movement simulation to the Sensor panel would push this into Feature Request territory. Maybe we could split that off into a separate bug?

Comment 5 by l...@chromium.org, Aug 19 2016

Status: Assigned (was: Untriaged)
Agreed, if most use cases of geo API are walking/biking/driving, we can reduce the default step.  For larger-step use cases, say emulating a satellite movement or Santa tracker, we could support that with Ctrl-up/down.

In the Elements panel sidebar, we actually have different steps for:
Ctrl-up/down: 100
Shift-up/down: 10
None-up/down: 1
Alt-up/down: 0.1

Let's have a similar treatment here.

Also, I created a separate bug for the movement simulation request
https://bugs.chromium.org/p/chromium/issues/detail?id=639392
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/82b72ec0ba6fd4c3f93634993833aa0c5eac0b65

commit 82b72ec0ba6fd4c3f93634993833aa0c5eac0b65
Author: Erik Luo <luoe@chromium.org>
Date: Fri Jan 19 23:49:14 2018

DevTools: enable Alt/Shift/Ctrl scaling for more numeric inputs

In StylesSidebarPane, you can press Arrow keys to increment a numeric value.
Holding Alt/Shift/Ctrl can affect the delta by 0.1/10/100

This CL
- Brings the same ability to 2 clients of UI.bindInput(): Latitude/longitude in
  Sensors and width/height in Device Mode
- Gives Latitude/longitude smaller step sizes of 0.01/1/10.

Bug:  637897 
Change-Id: I3844280a71449ab5021c9aadee9313cb626379b6
Reviewed-on: https://chromium-review.googlesource.com/818535
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530662}
[modify] https://crrev.com/82b72ec0ba6fd4c3f93634993833aa0c5eac0b65/third_party/WebKit/Source/devtools/front_end/emulation/SensorsView.js
[modify] https://crrev.com/82b72ec0ba6fd4c3f93634993833aa0c5eac0b65/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js

Comment 7 by l...@chromium.org, Jan 19 2018

Status: Fixed (was: Assigned)

Sign in to add a comment