phetsims / greenhouse-effect

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

Context responses not delivered when using StepForwardButton #366

Closed arouinfar closed 10 months ago

arouinfar commented 11 months ago

When the greenhouse gas concentration changes there are a series of context responses that look something like this: image

If the sim is paused and stepped forward, none of these responses will be triggered. It seems like they get stuck in the utterance queue.

For example:

  1. Open sim in a11y view, select Photons screen.
  2. Start sunlight and wait until you reach equilibrium.
  3. Pause sim.
  4. Change greenhouse gas concentration slightly.
  5. Step forward until surface temperature is nearly stabilized.
  6. Unpause sim, and the Activity Log will flood with backlogged context responses. image

Another example:

  1. Follow steps 1-4 from before.
  2. Step forward until surface temperature has completely stabilized.
  3. Unpause sim, and the Activity Log will only include the stable statement, e.g. "Surface temperature stable at 35.4 degrees Fahrenheit."

Assigning to @jbphet but marking as deferred because development is currently paused.

jbphet commented 11 months ago

@jessegreenberg, @jonathanolson, and I discussed this issue with @arouinfar today. Here are the next steps that we decided upon:

jbphet commented 10 months ago

The previous code did not output any context responses if the model was paused, which is why none were coming out when the StepForwardButton was pressed. The code has been modified to use the model's accumulated time to decide when to output these responses, and this seems to correct the problem, but the context responses are pretty infrequent in this situation.

@arouinfar - Please review the behavior on master and let us know if the new behavior is acceptable or if you'd like the responses to come out more frequently when stepping. If the more frequent ones are desired, please specify how often they should occur.

arouinfar commented 10 months ago

The behavior in main is looking much better. All of the alerts are coming through, albeit very slowly. I discussed with @jbphet and we'd like to try an interval of 1 second when paused. Back to @jbphet.

jbphet commented 10 months ago

We've added the shorter interval for alerts when stepping. Seems much better. We also made it so that when the user switches between playing and paused the first alert will come out at half the usual time so they don't have to wait too long.

@arouinfar - Please take this for a test drive and let us know what you think.

arouinfar commented 10 months ago

Thanks @jbphet! The behavior in main is much better now. Closing.