phetsims / pendulum-lab

"Pendulum Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
4 stars 10 forks source link

[LoL Harness] Stopwatch moving after resume #187

Closed ghost closed 6 years ago

ghost commented 6 years ago

Test device:

MacBook Air (13-inch, Early 2015)

Operating System:

macOS Sierra 10.12.6

Browser:

Firefox 55.0.3

Problem description:

In the Legends of Learning harness, the stopwatch and the ruler will, if being dragged across the screen when the sim is paused, move after the "Resume" button is clicked. This is for phetsims/QA/issues/45. It can be difficult to observe this phenomenon. I had to repeat the steps below several times to get a decent set of screenshots.

I've also managed to get the sliders (for length, mass, etc.) to move slightly after clicking the resume button, but this is more difficult than getting the various objects to move.

This issue seems to occur in both Firefox and Safari.

Steps to reproduce:

  1. Make sure the "Ruler" and "Stopwatch" boxes are checked.
  2. Put the stopwatch next to the ruler.
  3. Click the "Pause in 5 Seconds" button.
  4. Drag the stopwatch up and down vigorously.
  5. Once the sim is paused, make a mental note of where the stopwatch is WRT the ruler, e.g. at the 22 cm tick mark.
  6. Click the "Resume" button.
  7. The stopwatch should move.

New and Improved Steps

  1. Make sure the "Stopwatch" box is checked.
  2. Drag the stopwatch to the lower right hand corner of the sim.
  3. Start the stopwatch.
  4. When the stopwatch reads 5.00 seconds, press the "Pause in 5 Seconds" button.
  5. Right before the timer reads 10.00 seconds, drag the stopwatch to the upper left hand corner of the sim. Hopefully you will have timed it so that you're in the middle of dragging the stopwatch when the sim is paused.
  6. The stopwatch should move when the "Resume" button is clicked.

Even Newer and More Improved Steps

  1. Select an item to drag around.
  2. Click the "Pause in 5 Seconds" button.
  3. Move your cursor around quickly and erratically. I like to try to make figure 8s.
  4. This should reproduce the issue more reliably than the other two sets of steps, but they might be worth trying.

(This works for the ruler as well.)

Screenshots:

screen shot 2017-09-05 at 12 58 25 pm

Notice that the top of the stopwatch is in line with the 36 cm tick mark.

screen shot 2017-09-05 at 12 58 38 pm

(I haven't moved the stopwatch after clicking the "Resume" button.) Notice that the stopwatch is now in line with the 47 cm tick mark.

Troubleshooting information (do not edit):

Name: ‪Pendulum Lab‬ URL: http://www.colorado.edu/physics/phet/dev/html/pendulum-lab/1.0.0-rc.2/pendulum-lab_en.html Version: 1.0.0-rc.2 2017-08-29 22:07:39 UTC Features missing: touch User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0 Language: en-US Window: 1440x630 Pixel Ratio: 1/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 Vendor: Mozilla (Mozilla) Vertex: attribs: 16 varying: 16 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 16) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"928741cf","branch":"HEAD"},"axon":{"sha":"24c942a4","branch":"HEAD"},"babel":{"sha":"7619e2ca","branch":"master"},"brand":{"sha":"cfca902d","branch":"HEAD"},"chipper":{"sha":"c6ebc753","branch":"HEAD"},"dot":{"sha":"db33a2c7","branch":"HEAD"},"joist":{"sha":"18d08df1","branch":"HEAD"},"kite":{"sha":"dc5c4382","branch":"HEAD"},"pendulum-lab":{"sha":"b250e2d2","branch":"HEAD"},"phet-core":{"sha":"6bfeef5c","branch":"HEAD"},"phetcommon":{"sha":"7ec5d299","branch":"HEAD"},"query-string-machine":{"sha":"c74e454e","branch":"HEAD"},"scenery":{"sha":"d539ecd7","branch":"HEAD"},"scenery-phet":{"sha":"7b214b9d","branch":"HEAD"},"sherpa":{"sha":"8a5d6d7f","branch":"HEAD"},"sun":{"sha":"9820ea30","branch":"HEAD"},"tandem":{"sha":"37243b99","branch":"HEAD"}}

kathy-phet commented 6 years ago

@lmulhall-phet -- can you elaborate on a few things.... Does the stopwatch just move to a new spot and then stop there upon resume? Does the sim continue to work normally, despite this move?

ghost commented 6 years ago

@kathy-phet -- Yes, the stopwatch moves to a new spot and stops at the new spot upon resume, and the sim works normally. It doesn't seem like a serious issue to me, i.e. I can't see how it would be terribly inconvenient for the user, but I thought I'd bring it up so that a higher-up could determine whether it's worth doing anything about it.

sep-07-2017 10-02-37

kathy-phet commented 6 years ago

@lmulhall-phet -- Yes, thanks for bringing it up. It will be good to understand why (from @jonathanolson ) it is doing this and if a fix for our main code as deemed appropriate. But I don't think we need to republish any of the current sims for LOL just for this behavior.

kathy-phet commented 6 years ago

Added deferred label, since fixing this is not needed for going ahead.

jonathanolson commented 6 years ago

Briefly discussed potential fixes with @samreid, and applied the patch above (to master and a sim-specific branch for 1.0). Should be fixed (and will fix other sims also).

phet-steele commented 6 years ago

Sorry @BryceAG I had one thing to say about this, reopening.

@jonathanolson @samreid it's now very unwieldy to pause a swinging pendulum at a particular point since it will continue animating briefly after a pause (not sure the use case, but noting). It also causes some, at times significant, "jumping" of a swinging pendulum. Are we sure this is the right path to take? Really all we've done is take the symptom of this issue and move it elsewhere. Instead of the jumping occurring on resume, it now happens on pause.

Here's a video of the tradeoffs. I personally prefer the behaviour before the fix. What's everyone's opinion? And don't confuse the gif-loop jump with the animation jump that happens around the time of pausing.

Before the fix, pendulums/stopwatch jumped on resume, not pause:

pl03

After the fix, pendulums/stopwatch jump on pause, not resume. They continue swinging to the right slightly after the pause: pl02

I've verified that the physics and other sim behaviour remains intact regardless of any pendulum jumping, but not sure if the same could be said about other sims.

phet-steele commented 6 years ago

@kathy-phet I'm aware that this issue is deferred. I still think it is worth it to give a very brief opinion on if the commit in this issue should be reverted or not.

phet-steele commented 6 years ago

@kathy-phet likes the fixed behaviour so I'll unassign everyone.