phetsims / gas-properties

"Gas Properties" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 6 forks source link

Currently unable to hide a particle type in the Average Speed Panel #277

Closed Nancy-Salpepi closed 4 days ago

Nancy-Salpepi commented 1 week ago

While testing https://github.com/phetsims/qa/issues/1100, on the Energy Screen I noticed that it is currently not possible to hide one of the particle types in the Average Speed panel.

If I set averageSpeedAccordionBox.heavyNumberDisplay.visibleProperty or averageSpeedAccordionBox.lightNumberDisplay.visibleProperty to false, a value will no longer show, but the particle icon is still present. Wondering if there is an easy way to solve this?

Screenshot 2024-06-25 at 12 27 56 PM

I thought that perhaps an instructor may want to only focus on the relationship between temperature, KE and speed. Currently, it is possible to show only 1 particle type everywhere else on this screen (remove radio buttons under pump, remove particle type in Particles panel, remove checkbox groups for the graphs).

pixelzoom commented 6 days ago

Meeting with @arouinfar and @Nancy-Salpepi:

Set visibility of particle icons based on visibility of NumberDisplay instances. See AverageSpeedAccordionBox.ts.

Feature averageSpeedAccordionBox.heavyNumberDisplay.visibleProperty and averageSpeedAccordionBox.lightNumberDisplay.visibleProperty.

pixelzoom commented 4 days ago

averageSpeedAccordionBox.heavyNumberDisplay.visibleProperty and averageSpeedAccordionBox.lightNumberDisplay.visibleProperty are now featured. Setting them to false also hides their associated particle icons.

@Nancy-Salpepi please review, close if OK.

Nancy-Salpepi commented 4 days ago

Looks great. I can now completely hide one particle type on the Energy Screen! Closing.