Closed arouinfar closed 5 months ago
For discussion with @arouinfar and @Nancy-Salpepi on 6/11/24, I added diffusionScreen.view.viewProperties.numberOfParticleTypesProperty
. It looks like this in Studio:
Setting its value to 1
results in the UI looking like the screenshot shown below. Particle type 2 is hidden from the settings panel and Data accordion box, and the icon changes for the "Center of Mass" checkbox.
Things that I don't like about this:
(1) The empty space in the settings panel. I've tried to center the spinners, but it's difficult (impossible?) because of how the code is structured to facilitate hiding (for example) settingsPanel.massControls
.
(2) Showing the blue particle icon 6x when there is only one particle type feels redundant. We would never design the UI like this.
Reviewed with @arouinfar and @Nancy-Salpepi, looks good as is. @arouinfar has a note about adding this to examples.md, so we can close.
For #30
It's not possible to limit students to a single type of particle on the Diffusion Screen. @Nancy-Salpepi noted that she usually has students explore how a single type of particles spreads out throughout the container.
In the
settingsPanel
, we can hide individual rows of controls for variables outside the scope of the lesson's goals.However, this prevents exploration of a single type of particles dispersing throughout the container, as we decided to uninsturment
numberSpinner.visibleProperty
.An easy solution would be to re-instrument the NumberSpinners for type 2 particles. The UX would be a bit clunky though, as it would require users to hide 4 controls. It's also an imperfect solution because the Data readouts and Center of Mass icon still refer to the hidden particle type.
@pixelzoom could we create a Property that would hide everything associated with type 2 particles? Let's discuss when you return.