Skip to content
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

Fold Options into Preferences. #837

Closed
19 tasks done
pixelzoom opened this issue Aug 22, 2022 · 30 comments
Closed
19 tasks done

Fold Options into Preferences. #837

pixelzoom opened this issue Aug 22, 2022 · 30 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Aug 22, 2022

Related to #835, and summary of Zoom discussion with @jessegreenberg ...

  • Any sim that has an Options dialog (uses SimOptions createOptionsDialogContent) will need to be folded into Preferences.
  • This will probably involve using SimOptions preferencesConfiguration instead of createOptionsDialogContent.
  • If the Options dialog uses ProjectorModeCheckbox, it should be removed, and instead added to the Preferences "Visual" tab.

These sims use createOptionsDialogContent but only have a ProjectorModeCheckbox:

  • atomic-interactions
  • blackbody-spectrum
  • charges-and-fields
  • coulombs-law
  • diffusion
  • models-of-the-hydrogen-atom
  • rutherford-scattering
  • states-of-matter
  • states-of-matter-basics

These sims use createOptionsDialogContent and have controls that should appear in Preferences "Visual" tab:

  • build-an-atom
  • center-and-variability
  • circuit-construction-kit-common
  • gas-properties
  • gases-intro
  • geometric-optics
  • molecule-polarity
  • molecule-shapes
  • molecule-shapes-basics
  • tambo
@zepumph
Copy link
Member

zepumph commented Aug 22, 2022

These sims use createOptionsDialogContent and have controls that should appear in Preferences "Visual" tab:

In that case, it will probably want to hold off until #835 has been worked out. If options are totally sim-specific, then we can proceed using PreferencesConfiguration.createSimControls

@zepumph
Copy link
Member

zepumph commented Aug 22, 2022

Definitely on hold until we finish #835, there is a new API for creating custom preferences, even in the general tab.

@zepumph
Copy link
Member

zepumph commented Aug 23, 2022

Now unblocked! Yay

zepumph added a commit to phetsims/atomic-interactions that referenced this issue Aug 23, 2022
zepumph added a commit to phetsims/models-of-the-hydrogen-atom that referenced this issue Aug 23, 2022
zepumph added a commit to phetsims/blackbody-spectrum that referenced this issue Aug 23, 2022
zepumph added a commit to phetsims/rutherford-scattering that referenced this issue Aug 23, 2022
zepumph added a commit to phetsims/charges-and-fields that referenced this issue Aug 23, 2022
zepumph added a commit to phetsims/states-of-matter-basics that referenced this issue Aug 23, 2022
@zepumph
Copy link
Member

zepumph commented Aug 23, 2022

I converted the ProjectorMode-checkbox-only sims over to preferences above. It lost PhET-iO instrumentation on some, but consistency is good. If we want the checkbox instrumented in the future, we will add it then.

zepumph added a commit to phetsims/circuit-construction-kit-dc that referenced this issue Aug 23, 2022
zepumph added a commit to phetsims/center-and-variability that referenced this issue Aug 23, 2022
zepumph added a commit to phetsims/molecule-shapes-basics that referenced this issue Aug 23, 2022
zepumph added a commit to phetsims/circuit-construction-kit-ac-virtual-lab that referenced this issue Aug 23, 2022
zepumph added a commit to phetsims/circuit-construction-kit-ac that referenced this issue Aug 23, 2022
zepumph added a commit to phetsims/greenhouse-effect that referenced this issue Aug 23, 2022
zepumph added a commit to phetsims/circuit-construction-kit-dc-virtual-lab that referenced this issue Aug 23, 2022
@pixelzoom
Copy link
Contributor Author

pixelzoom commented Aug 24, 2022

On Slack, we discussed the {sim}.global.model.preferences convention mentioned above.

Instead of defining this everywhere, like I've done in my sims:

const preferencesTandem = Tandem.GLOBAL_MODEL.createTandem( 'preferences' );

In the above commits, I've added this to Tandem.ts:

/**
 * Use this as the parent tandem for Properties that are related to sim-specific preferences.
 */
Tandem.PREFERENCES = Tandem.GLOBAL_MODEL.createTandem( 'preferences' );

So we should use Tandem.PREFERENCES for preferences Properties. And if the designers decide they want preferences Properties somewhere else in the Studio tree, we can just change Tandem.PREFERENCES.

jessegreenberg added a commit to phetsims/center-and-variability that referenced this issue Aug 25, 2022
jessegreenberg added a commit to phetsims/circuit-construction-kit-common that referenced this issue Aug 25, 2022
jessegreenberg added a commit to phetsims/energy-skate-park that referenced this issue Aug 25, 2022
jessegreenberg added a commit to phetsims/molecule-shapes that referenced this issue Aug 25, 2022
@jessegreenberg
Copy link
Contributor

OK, the PhET-iO changes described in the previous three comments are done. I think everything discussed in this issue is now complete. @zepumph can you think of anything else to review or do here?

zepumph added a commit to phetsims/energy-skate-park-basics that referenced this issue Aug 25, 2022
zepumph added a commit to phetsims/geometric-optics-basics that referenced this issue Aug 25, 2022
zepumph added a commit to phetsims/molecule-shapes that referenced this issue Aug 25, 2022
zepumph added a commit to phetsims/geometric-optics that referenced this issue Aug 25, 2022
zepumph added a commit to phetsims/molecule-polarity that referenced this issue Aug 25, 2022
zepumph added a commit to phetsims/states-of-matter that referenced this issue Aug 25, 2022
zepumph added a commit to phetsims/gas-properties that referenced this issue Aug 25, 2022
@zepumph
Copy link
Member

zepumph commented Aug 25, 2022

All looks good here. Thanks @pixelzoom and @jessegreenberg!!! Ready to close?

@zepumph
Copy link
Member

zepumph commented Aug 25, 2022

Please note that we will be adding a PhET-iO migration rule because we removed the OptionsDialog menu item (and whole dialog). See phetsims/gravity-and-orbits#434

@jessegreenberg
Copy link
Contributor

Commits above look good. I believe so, closing.

pixelzoom added a commit to phetsims/molecule-polarity that referenced this issue Aug 25, 2022
pixelzoom added a commit to phetsims/geometric-optics that referenced this issue Aug 25, 2022
pixelzoom added a commit to phetsims/gas-properties that referenced this issue Aug 25, 2022
jbphet pushed a commit to phetsims/greenhouse-effect that referenced this issue Sep 10, 2022
jbphet pushed a commit to phetsims/greenhouse-effect that referenced this issue Sep 10, 2022
jbphet pushed a commit to phetsims/greenhouse-effect that referenced this issue Sep 10, 2022
jbphet pushed a commit to phetsims/greenhouse-effect that referenced this issue Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants