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

How should the "Classical" to "Quantum" continuum bar behave when hiding radio buttons? #90

Closed
pixelzoom opened this issue Dec 17, 2024 · 6 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Dec 17, 2024

For PhET-iO, how should we handle the "Classical" to "Quantum" continuum bar (continuumBarNode) in the Spectra screen? The bar currently has a fixed length, so we end up with something like this if we hide a few of the radio buttons:

screenshot_3659

I could certainly make the bar resize dynamically. But with anything less than 4 radio buttons, there is no room for the "Classical" and "Quantum" text (let alone translated versions that may be longer). So before proceeding, I'm going to toss this back to @DianaTavares and the design team.

Options:

  1. Do nothing, and continuumBarNode will behave as shown above, always having a fixed height. If the space in the panel bothers the PhET-iO client, then they can set continuumBarNode.visiblePropertyto false and the panel will resize.
  2. Make continuumBarNode dynamically resize and allow the text to overlap. When it overlaps, the PhET-iO client is responsible for setting continuumBarNode.visiblePropertyto false. This will look buggy, so I don't see the point in doing this.
  3. Make continuumBarNode dynamically resize, and dynamically adjust maxWidth for the text. This will quickly result in unreadable text, so I don't see the point in doing this either.
  4. If any of the radio buttons is hidden, automatically hide continuumBarNode -- it's only visible if all 6 buttons are visible. This would preserve the continuum that PhET has intended.
  5. Get rid of continuumBarNode altogether, as we've done in the Energy Levels screen. I'm not sure how much this feature stimulates discussion about classical vs quantum models. But such discussion could be scaffolded in other ways.

My recommendation is option 1, with a related note in examples.md.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Dec 17, 2024

Regardless of whether we resize continuumNode, note that it's also possible to hide radio buttons in a way that the continuum makes no sense. For example:

screenshot_3660

Even something like this could be bad. If we resized the continuum bar, then "Classical" would overlap "Billiard Ball" and "Bohr", giving the false impression that Bohr is a classical model.

screenshot_3661

@pixelzoom pixelzoom changed the title How should the "Classical" to "Quantum" bar behave when 1 or more radio buttons are hidden? How should the "Classical" to "Quantum" bar behave when hiding radio buttons? Dec 17, 2024
@pixelzoom
Copy link
Contributor Author

I suspect that this will require discussion at a design meeting, so labeling as such.

@pixelzoom pixelzoom changed the title How should the "Classical" to "Quantum" bar behave when hiding radio buttons? How should the "Classical" to "Quantum" continuum bar behave when hiding radio buttons? Dec 17, 2024
@DianaTavares
Copy link
Contributor

Design Meeting January, 2nd
CM, DL, NS, AP, KP, KW

Option 1 is ok!!

@pixelzoom
Copy link
Contributor Author

We additionally decided to remove the panel that surrounds the radio buttons.

@pixelzoom
Copy link
Contributor Author

@DianaTavares This is ready for review. I've hidden the outline of the panel that contains the continuum bar and radio buttons. continuumBarNode.visibleProperty can be used to hide the continuum bar. And I've added a reminder in #54 to mention this is examples.md.

Close if everything looks OK.

@DianaTavares
Copy link
Contributor

Perfect!

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