phetsims / joist

Joist is the main framework for PhET Interactive Simulations. Joist creates and displays the simulation content, home screen, navigation bar, About dialog, enables switching between tabs, and other framework-related features.
MIT License
8 stars 6 forks source link

`?screens` should not change the PhET-iO API #826

Closed zepumph closed 1 year ago

zepumph commented 2 years ago

Over in https://github.com/phetsims/studio/issues/268#issuecomment-1198714103 and https://github.com/phetsims/phet-io/issues/1699 there was a large conversation about how Query Parameters can effect PhET-iO, most specifically as it pertains to the studio customization -> standard phet-io wrapper stack. Here are some gross things about the screens query parameter when making standard phet-io wrappers:

  1. Load studio with no query parameters, then add ?screens=1 to the standard wrapper. This will hard fail and not set state.
  2. Load studio with ?screens=1, then add ?screens=1,2 to the standard wrapper. This will currently fail in the "load" function because it compares what screens were used when customizing vs running.

@kathy-phet had the idea to update how ?screens works in the project so that it will always create all sim screens, but only display the currently "available" or "selected" or "visible" screens. This could be controlled by a PhET-iO instrumented Property.

Needed for this work:

Marking as an epic amount of work. yay!

kathy-phet commented 1 year ago

I'm closing this issue because after further thinking we realized that: 1) Using ?screens= in conjuction with the Standard PhET-iO Wrapper would not work because the state is set after the query parameters are initiated. Only ?locale= works after a wrapper is created in Studio. 2) We will pursue an easier improvement in Studio to support API clients to show just one screen Closing.