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

Launching a sim while dragging a planet #259

Closed KatieWoe closed 7 months ago

KatieWoe commented 7 months ago

Device Samsung OS Win 11 Browser Chrome Problem Description For https://github.com/phetsims/qa/issues/1034 If a sim is launched while the planet is being dragged the sound will be a continuous drone and you will be unable to drag the planet in the launched sim. The sound continues even if you then press play in the sim and start the planet's orbit. This is rather difficult to do outside of state, but since it prevents dragging of the planet it seems serious. Steps to Reproduce

  1. Go to state
  2. Increase the set-state rate to a relatively long time to give more time to observe the effects
  3. Drag the planet in the top sim until the state is set
  4. Let go and observe the continuing sound
  5. Try to interact with the planet in the bottom sim

Visuals

https://github.com/phetsims/keplers-laws/assets/41024075/cc60c679-7ce6-4546-af83-768ae39dd3a0

AgustinVallejo commented 7 months ago

I almost don't want to fix this, it's really fun to play with the polyphony with 4000ms delay :P (Looking into it)

AgustinVallejo commented 7 months ago

There were some properties that were instrumented and after talking to @zepumph we agreed that they probably shouldn't be. However, instrumenting them not only made API changes, but we also needed to implement a migration rule for it.

@arouinfar please make sure this change is OK to the PhET-iO design. The properties were userIsControllingMassProperty, userIsControllingPositionProperty, userIsControllingVelocityProperty

@KatieWoe please make sure that the problem is fixed and mark for cherry picking. Also, please be on the lookout for any bug related to the statefulness of "user currently controlling". We're fairly confident it shouldn't cause trouble down the line but just to make sure.

Thanks!

KatieWoe commented 7 months ago

Things looked ok on main to me

arouinfar commented 7 months ago

@AgustinVallejo uninstrumenting all userIsControlling*Property makes sense to me. Looks good in Studio.

KatieWoe commented 7 months ago

Looks good in rc.2 to me