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

Diffusion Screen: make it possible to hide one type of particles #255

Closed
arouinfar opened this issue Jun 5, 2024 · 2 comments
Closed

Diffusion Screen: make it possible to hide one type of particles #255

arouinfar opened this issue Jun 5, 2024 · 2 comments

Comments

@arouinfar
Copy link
Contributor

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.
image

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.

@pixelzoom
Copy link
Contributor

pixelzoom commented Jun 10, 2024

For discussion with @arouinfar and @Nancy-Salpepi on 6/11/24, I added diffusionScreen.view.viewProperties.numberOfParticleTypesProperty. It looks like this in Studio:

screenshot_3342

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.

screenshot_3341

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.

pixelzoom added a commit that referenced this issue Jun 11, 2024
@pixelzoom
Copy link
Contributor

Reviewed with @arouinfar and @Nancy-Salpepi, looks good as is. @arouinfar has a note about adding this to examples.md, so we can close.

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

2 participants