phetsims / molecule-shapes

"Molecule Shapes" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/molecule-shapes
GNU General Public License v3.0
5 stars 6 forks source link

'Remove All' button does not stay disabled in Studio #198

Closed Nancy-Salpepi closed 2 years ago

Nancy-Salpepi commented 3 years ago

Test device iPad Air 2

Operating System 15.1

Browser safari

Also seen with MacBook Air OS 12.0.1 + chrome

Problem description https://github.com/phetsims/qa/issues/715 https://github.com/phetsims/qa/issues/716

After disabling the 'Remove All' button in Studio, the button becomes enabled once another bond is added to the molecule.

Steps to reproduce

  1. Go to moleculeShapes.modelScreen.view.removeAllButton.enabledProperty and uncheck 'selected' checkbox to disable
  2. Add another bond to the molecule -- the checkbox becomes enabled again OR
  3. Go to moleculeShapes.modelScreen.view.removeAllButton.enabledProperty and uncheck 'selected' checkbox to disable
  4. Press 'Preview Sim'
  5. Add another bond to the molecule

Visuals removeall

jonathanolson commented 3 years ago

@arouinfar This is a case where whether the button is enabled is determined by the sim. Should we create a new Property to determine whether the button CAN be enabled?

arouinfar commented 3 years ago

@jonathanolson I think in this case we can make the button's enabledProperty phetioReadOnly: true. The model should be controlling this property, not the client. If a client wants to prevent users from using this button, they can hide it instead.

jonathanolson commented 3 years ago

Should be handled above.

arouinfar commented 3 years ago

Looks good in master @jonathanolson!

KatieWoe commented 2 years ago

Looks good in rc.1