phetsims/neuron

Cannot drag potential chart tracer forward

Closed this issue · 10 comments

Test device: Mac Air, Jordan

Operating System: OS X 10.9.5

Browser: Safari 9

Problem description: The tracer on the potential chart can be dragged backwards, but not forward. This seems strange because a forward pointing arrow appears when hovering over the tracer and the sim can be clicked forward frame-by-frame. This is more of a design question.

Steps to reproduce: Plot some amount on the potential chart. Pause sim. Attempt to drag tracer forward.

Severity:

Screenshots:

Troubleshooting information (do not edit):
Name: ‪Neuron‬
URL: http://www.colorado.edu/physics/phet/dev/html/neuron/1.0.0-rc.1/neuron_en.html
Version: 1.0.0-rc.1 2015-12-22 23:06:19 UTC
Features missing: touch
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/537.86.2
Language: en-us
Window: 1264x598
Pixel Ratio: 1/1
WebGL: WebGL 1.0 (2.1 INTEL-8.28.36)
GLSL: WebGL GLSL ES 1.0 (1.20)
Vendor: WebKit (WebKit WebGL)
Vertex: attribs: 16 varying: 15 uniform: 1024
Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 16)
Max viewport: 16384x16384
OES_texture_float: true
Dependencies JSON: {"assert":{"sha":"d4909677","branch":"HEAD"},"axon":{"sha":"6f3c2e01","branch":"HEAD"},"babel":{"sha":"9618fad2","branch":"master"},"brand":{"sha":"c9282935","branch":"HEAD"},"chipper":{"sha":"1d1d5d32","branch":"HEAD"},"dot":{"sha":"7a28b1a9","branch":"HEAD"},"griddle":{"sha":"3adb78bd","branch":"HEAD"},"joist":{"sha":"191b15a4","branch":"HEAD"},"kite":{"sha":"4a947119","branch":"HEAD"},"neuron":{"sha":"3b7eee9d","branch":"HEAD"},"phet-core":{"sha":"73a034c6","branch":"HEAD"},"phetcommon":{"sha":"d712ace0","branch":"HEAD"},"scenery":{"sha":"47143cdd","branch":"HEAD"},"scenery-phet":{"sha":"a7f975d1","branch":"HEAD"},"sherpa":{"sha":"be8c4fc9","branch":"HEAD"},"sun":{"sha":"64555735","branch":"HEAD"},"tandem":{"sha":"07fbe58c","branch":"HEAD"}}

I also find it strange that a forward-facing arrow appears when hovering over the tracer, but the tracer can only be dragged back in time (initially, at least).

It looks like the Chrome/Safari arrow is different from the Firefox arrow, so I don't think it's a feature we've designed, but rather a browser feature.

This behavior is by design. The chart indicates the total time that has been simulated so far, so it can't be dragged into the future, since the simulated data doesn't exist yet. Allowing this would entail having the simulation run forward at an arbitrarily rate, which would be challenging if the cursor were dragged quickly given the amount of computational power that this would require.

As for the bidirectional arrow cursor, this is used because the cursor can be dragged backwards and forwards when it is anywhere other than at the end of the simulated data (or at the very beginning, in which case it can only be dragged forward). It might be possible to change the cursor to point only to the left when the cursor is at the end of the simulated data, and only to the right if at the beginning of the data, but I just tried a couple of cursor options to see if it was easy to do this and they didn't create the envisioned left- and right-only arrow cursors, so I'm not sure this is worth further effort.

My suggestion is to leave the sim as is for this one. Adding the ability to drag forward would be a big change, well beyond what we have time for. Even changing the cursor looks like it might take some time, and it didn't seem to trouble anyone that used the Java sim.

Assigning to @ariel-phet for disposition.

Thanks for the clarification @jbphet. I don't think it's necessary to drag the tracer forward in time, but I think it's misleading design to show a forward-only arrow when something can only be dragged backward (which is the case when the tracer is first grabbed).

As for the bidirectional arrow cursor, this is used because the cursor can be dragged backwards and forwards.

The arrow cursor in Mac OSX 10.11.2 is not bidirectional. In Chrome and Safari, the arrow points forward only, and in Firefox the arrow has a vertical line at its base, but also points forward. Unfortunately, I can't make the cursor show up in my screenshots, otherwise I'd paste them in.

I agree with @arouinfar that this is an undesirable feature, and it would be an improvement to have more cogent hover behavior in terms of the type of cursor that appears. However, given the potentially invasive changes (as mentioned by @jbphet) , we will not make any modifications for this release.

Labeling enhancement, leaving as an open issue, and clearing the assignee.

I also agree here. The forward arrow cursor is slightly misleading when the tracer can only be dragged backwards at first.

@jbphet I am noticing that the drag cursor looks different depending on what platform I am running the sim on. Some point in both directions, some point only forward, one points forward with a vertical line on the back side. Might be something to keep in mind if you decide to revise the drag cursor.

I also agree here. The forward arrow cursor is slightly misleading when the tracer can only be dragged backwards at first.

I noticed the same thing during testing. The specified cursor is cursor: 'e-resize', . Why not go with ew-resize? Example icons can be viewed here:
https://developer.mozilla.org/en-US/docs/Web/CSS/cursor

This fix would only require adding a single character (smallest commit ever!)

The problem appears to be specific to Mac OS. I just duplicated it with the live version of Neuron (1.1.17) on Mac OS 10.14.6 Mojove using the Macbook Air named "Jordan". On this device, the problem occurs on Safari, Firefox, and Chrome. It does not occur on Firefox or Chrome on my Win 10 device.

I tried changing the cursor to ew-resize, and this solves the problem, meaning that the cursor now looks bi-directional rather than uni-directional on Mac in all three browsers. I'll propagate this to the release branch so that it will go out with the next maintenance release, which should be soon.

I tried cherry picking the fix to the branch, but it didn't work, so I made the change manually. It should now be fixed and will go out with a maintenance release, and I know that one is in the works. I'm going to mark this as deferred and put a reminder on my calendar to check the published version in a couple of weeks.

I just checked the deployed version of Neuron, v1.1.18, on the PhET MacBook Air named "Jordan", Safari version 13.0.2, Mac OS 10.14.6, and the problem has been fixed. Closing.