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

[CODAP] How should Preferences + State in a saved version work? #1012

Open
Nancy-Salpepi opened this issue Nov 13, 2024 · 1 comment
Open

Comments

@Nancy-Salpepi
Copy link

Test device
MacBook Air M1 chip

Operating System
15.0.1

Browser
Safari 18.0.1

Problem description
For phetsims/qa#1170, if I open a saved CODAP wrapper that had alternate sensors in it, turn off alternate sensors, and then press Reset All -- the sensor will be there (but "alternate sensors" is unchecked in preferences). How should preferences and state work?

Should the "Alternate Sensors" preference:

  1. Only apply to the toolbox and not the tools? If so, it shouldn't delete sensors from the circuit?
  2. Hide everything about the sensors, including the sensors already in the circuit? If this is the desired option, then @arouinfar said that state needs to be overwritten so that the Reset All state doesn't reintroduce those sensors. Perhaps this issue will be of some help: Temperature units switch back to default when setting state greenhouse-effect#356

Steps

  1. Save a CODAP wrapper that has a circuit with an alternate sensor.
  2. Open the saved wrapper
  3. Go to preferences and turn off Alternate sensors --sensor is removed from circuit
  4. Press Reset All --sensor is added back to circuit but Alternate Sensors is still off in Preferences
@kathy-phet
Copy link

kathy-phet commented Nov 15, 2024

Only apply to the toolbox and not the tools? If so, it shouldn't delete sensors from the circuit?

It should remove all the alternative sensors, even if they are in a circuit.

Hide everything about the sensors, including the sensors already in the circuit? If this is the desired option, then @arouinfar said that state needs to be overwritten so that the Reset All state doesn't reintroduce those sensors. Perhaps this issue will be of some help: phetsims/greenhouse-effect#356

Sim-specific preferences are stateful, so it should remember the state of that preference. Medium priority as it is less likely. May wait for Matt B to get back or Joey to say its important to fix this.

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