phetsims / keplers-laws

"Kepler's Laws" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 1 forks source link

Period timer and period orbit can be out of sync in Standard wrapper #244

Closed Nancy-Salpepi closed 8 months ago

Nancy-Salpepi commented 9 months ago

Test device MacBook Air M1 chip and iPad

Operating System macOS 14.1.2 and iPadOS 17.2

Browser Chrome and Safari

Problem description For https://github.com/phetsims/qa/issues/1023, On the Third Law screen if the period timer has been played and then paused or is still playing when the standard wrapper is launched, the timer and period orbit won't match up. The orbit will be complete but the timer will still go until it reaches the period time (1.84 yrs for default orbit). Not sure why an instructional designer would want to do this, but still thought I should report this edge case.

Steps to reproduce

  1. In Studio on the Third Law screen check Period Timer
  2. Press Play
  3. Let the planet advance a bit and then Press the test button OR press Pause and then Play in the Standard wrapper

Visuals

https://github.com/phetsims/keplers-laws/assets/87318828/8a20ebf1-f730-4081-af30-40032f1b5e9c

pixelzoom commented 9 months ago

@AgustinVallejo Let me know if you need assistance with this.

AgustinVallejo commented 9 months ago

Assigning back for review

Nancy-Salpepi commented 9 months ago

Looks good on main. Closing!

KatieWoe commented 9 months ago

A version of this seems to happen in https://github.com/phetsims/qa/issues/1034. It is more difficult to see in studio, but fairly easy to see in state. If the period timer is running and a new state is loaded also running the period timer then the timer will freeze. Steps in State

  1. Set the set state rate to refresh at least twice during a period
  2. In the top sim start an orbit with the period timer going.

Steps in Studio

  1. Set an orbit with the period timer going
  2. While the orbit is going, download the file
  3. While the orbit is still going before the timer is done, load the downloaded file.

https://github.com/phetsims/keplers-laws/assets/41024075/654e10dc-dfe4-4321-b6e2-7e5c67e262e9

AgustinVallejo commented 8 months ago

The above commit should've solved this. Let me know if it's ready to cherry pick

KatieWoe commented 8 months ago

Looks ok on main to me

KatieWoe commented 8 months ago

This looks ok to me in rc.2