-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
standardize query parameter for "projector mode" feature #371
Comments
Since "projector mode" is a subset of the more general "color scheme" issue (see #222)... My vote is for colorScheme: {
type: 'string',
defaultValue: 'default',
validValues: [ 'default', 'projector' ]
} Sample usage: Molecule Shapes appears to have 3 color schemes: default, basics, projector (see MoleculeShapesColors). So we'll need to decide whether |
Sounds good
It seems sim-specific (or at least, we should have ways of having sim-specific color profiles). |
Agreed, there should be a sim-specific way of defining color profiles. |
There's nothing that limits a sim's ability to define a color profile. But there's currently no ability for a sim to modify the schema for a common-code query parameter -- i.e., no ability to add |
... i.e., Molecule Shapes would copy the colorScheme: {
type: 'string',
defaultValue: 'default',
validValues: [ 'default', 'projector', 'basics' ]
} ... then use |
I asked:
I don't see a way to do this. The schema is evaluated in preloads, way before the sim every exists. So there's no opportunity for a sim to (for example) add to |
Regarding the proposal in #371 (comment) If you supply ?colorScheme=basics, then the validation in phetcommon would fail. |
Ah, yes. So the sim would also need to change the query parameter name, and that seems very undesirable. |
11/10/16 dev meeting notes: |
The schema will be: colorProfile: {
type: 'string',
defaultValue: 'default'
} Sample use:
For sims that want to set a flag to enable projector mode:
I'll handle the changes. |
charges-and-fields was converted in phetsims/charges-and-fields@78353b5. molecules-shapes was converted in phetsims/molecule-shapes@1959d3a and phetsims/molecule-shapes@7baa6c8. |
All sims converted and tested. Projector mode is enabled with @jessegreenberg, you won the lottery - would you please verify? |
I reviewed the commits above and tested all of the sims listed in #371 (comment). I verified that the query parameter @pixelzoom is that all for this issue? |
Yep, that's it. Thanks. Closing. |
Noted while working on phetsims/chipper#516.
There are currently 2 different query parameters (
projector
andprojectorMode
) used to enabled the "projector mode" feature that is available in some sims.Q1: Should PhET standardize this?
Q2: Should it be in the QueryStringMachine schema for common code, so it's not repeated in sim-specific schemas?
Here are the clients of the 2 query parameters:
projector
projectorMode
The text was updated successfully, but these errors were encountered: