phetsims / molecules-and-light

"Molecules and Light" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 5 forks source link

Query parameters to limit gases and light sources #377

Closed kathy-phet closed 3 years ago

kathy-phet commented 4 years ago

Received an inquiry from a national effort to create an openly-licensed science curriculum. They would like to be able to remove some gases and some energy sources. Would it be difficult to add a query parameter to enable users to do this sort of limitation? I also would like to understand how this would interplay with the accessible description and features?

samreid commented 4 years ago

About the query parameter syntax, we could opt-in by saying exactly which sources and gases are desired: ?sources=microwave,visible&gases=carbonMonoxide,nitrogen,water.

Or we could indicate which ones to omit: ?omitSources=visible&omitGases=methane

The top "opt-in" approach seems more natural, but if most use cases are "I'd just like to remove one or two things", then the latter "opt-out" approach may be better.

I skimmed through the creation of the radio buttons and didn't see major obstacles for pruning the sources or gases. But I don't know enough about the accessibility content to comment on that part.

jessegreenberg commented 4 years ago

I like that syntax, that would make sense to me.

I don't anticipate any problems with adding support for this. I don't think there will be an impact on the accessibility features. I reviewed the descriptions and don't see any that are dependent on a certain number of gasses/sources or assume all are in the sim.

@kathy-phet what do you think about the syntax that @samreid proposed, should I add this?

samreid commented 4 years ago

Specifically, please comment whether you prefer the "opt-in" or "opt-out" approach.

arouinfar commented 4 years ago

I'm think the opt-out approach will generally end up with shorter query parameter values, so that'd be my vote. It also sounds more advantageous for this particular client.

kathy-phet commented 4 years ago

Moving discussion here: https://github.com/phetsims/special-ops/issues/175

jessegreenberg commented 3 years ago

Closing this issue, it is being tracked in the issue above.