phetsims / john-travoltage

"John Travoltage" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/john-travoltage
GNU General Public License v3.0
4 stars 8 forks source link

Query parameters for Voicing initial checkbox state #419

Closed brettfiedler closed 3 years ago

brettfiedler commented 3 years ago

For the first Voicing survey, we would like to have a few query parameters to create links that will be embedded in iFrames for 3 different versions of John Travoltage:

1.) Object changes & Context Changes checked/enabled [X] [X] 2.) Only Context changes checked/enabled (object changes disabled) [ ] [X] 3.) Both Object and Context changes unchecked/disabled [ ] [ ]

brettfiedler commented 3 years ago

We would like this fairly quickly, ideally before the middle of next week.

jessegreenberg commented 3 years ago

These were added, can you please review and make sure this is working as you need @BLFiedler?

The query parameters added were

voicingNameResponsesInitiallyEnabled
voicingObjectResponsesInitiallyEnabled
voicingContextResponsesInitiallyEnabled
voicingHintResponsesInitiallyEnabled

1) Is default settings (https://phet-dev.colorado.edu/html/john-travoltage/1.6.0-preferences.8/phet/john-travoltage_en_phet.html) 2) Is at https://phet-dev.colorado.edu/html/john-travoltage/1.6.0-preferences.8/phet/john-travoltage_en_phet.html?voicingObjectResponsesInitiallyEnabled=false 3) Is at https://phet-dev.colorado.edu/html/john-travoltage/1.6.0-preferences.8/phet/john-travoltage_en_phet.html?voicingObjectResponsesInitiallyEnabled=false&voicingContextResponsesInitiallyEnabled=false

Note that now that 'Names' are separate from object responses they will be heard even in version (3), so you still hear "Leg Swing" and "Arm Swing" and "Reset All", for example.

brettfiedler commented 3 years ago

@jessegreenberg reminded me that we will need the ability to start the sim with the Preferences dialog open and on the Audio tab.

I can confirm the above versions with query parameters work. And re: the "Names" for version 3, that is exactly what we want!

jessegreenberg commented 3 years ago

In https://phet-dev.colorado.edu/html/john-travoltage/1.6.0-preferences.10/phet/john-travoltage_en_phet.html the dialog is open to the "Audio" tab. I just found that the sim is crashing in Edge the first time it loads, loads correctly after a refresh. Looking into that.

jessegreenberg commented 3 years ago

It is happening because the voices are not defined on startup in Edge when the dialog is opened. Need to handle this gracefully somehow.

jessegreenberg commented 3 years ago

Should be resolved in the above commits, I changed it so that whenever the list of available Voices changes from the browser we create a new ComboBox for voices. Also gracefully supported when no voices are available yet.

I briefly tested the sim in Windows Chrome, Firefox and Edge.

@BLFiedler back to you, does this version have everything you need for the survey?

https://phet-dev.colorado.edu/html/john-travoltage/1.6.0-preferences.11/phet/john-travoltage_en_phet.html

brettfiedler commented 3 years ago

Definitely opens on the correct screen on desktop, but I cannot get it to load in Chrome on mobile (Android, tried wife's device too). It stays on the PhET loading screen. I anticipate many survey participants completing it on mobile devices.

Can you confirm this behavior and fix if reproducible @jessegreenberg ?

jessegreenberg commented 3 years ago

Confirmed, remote debugging session shows

![image](https://user-images.githubusercontent.com/6396244/119733874-1db11780-be48-11eb-986e-6abf22de91c8.png)
jessegreenberg commented 3 years ago

Thanks for testing @BLFiedler, should be fixed in this version: https://phet-dev.colorado.edu/html/john-travoltage/1.6.0-preferences.12/phet/john-travoltage_en_phet.html

Can you please confirm?

brettfiedler commented 3 years ago

Can confirm! Also tried on iOS on iPad on Safari and Chrome. Going to try the query parameters on these platforms in this version just to be safe before I close this issue.

jessegreenberg commented 3 years ago

Just a heads up @BLFiedler - https://github.com/phetsims/john-travoltage/issues/422 seems pretty serious, and probably impacts this issue. We may want to discuss how to handle if I can't find a fix.

brettfiedler commented 3 years ago

@jessegreenberg Keeping tabs on that issue, but that seems like it could be a rare combination and if it seems to be a long-term hold-up, I will include it in the survey instructions that that combination of OS/browser does not work and if they could please open it in another browser.

brettfiedler commented 3 years ago

Closing and leaving this discussion to #422