phetsims / wave-interference

"Wave Interference" is an educational simulation in HTML5, by PhET Interactive Simulations.
MIT License
18 stars 5 forks source link

Disable Play Tone checkbox when sound is muted from the navbar #507

Closed arouinfar closed 3 years ago

arouinfar commented 3 years ago

When muting sound from the navbar, it turns off ALL sound in the sim. This can lead to an odd UX with the Play Tone checkbox. It's possible to interact with the checkbox, but nothing will happen. This feels really broken to me.

@samreid would it be possible to set the enabledProperty of the Play Tone checkbox to false if the sound is muted? I realize this is still not a perfect solution because the checkbox could be checked, but otherwise look disabled. However, I think disabling it would still cue users that the feature isn't available.

samreid commented 3 years ago

That sounds technically feasible, but I recommend discussion with the sonification team to determine whether this is the long term design for when this comes up in other sonification sims, so we can ensure we have a good long term solution and won't need to change this when another occurrence comes up.

Other questions:

Assigning to @jbphet @arouinfar and @emily-phet for feedback, please assign others as necessary.

jbphet commented 3 years ago

This issue was discussed in the 8/18/2020 sound design meeting with @emily-phet, @Ashton-Morris, @BLFiedler, and me, and here are our current thoughts:

jbphet commented 3 years ago

Unassigning myself and @emily-phet, over to @arouinfar for her input and @samreid for next steps.

samreid commented 3 years ago

@arouinfar can you please recommend how to proceed, then assign to me?

arouinfar commented 3 years ago

Thanks for the suggestions and discussion @samreid @jbphet.

We do think that the sound icon on the nav bar should be a global control for all sound, so if sound is off, these sounds should not be audible

I agree 100%. Muting sound from the navbar should be global. There will be situations where there is a sound that we want users to be able to opt-out of without muting all sound in the sim. This is the case with the "Play Tone" and "Sound Effect" checkboxes in Waves Intro, and there is a similar situation in Fourier: Making Waves.

  • On the 2nd screen, perhaps using a slightly different label on the checkbox would help to connect that tone and the overall sound setting for the sim would help.
  • Perhaps putting some sort of an icon that represents the sound state next to the label

I don't think that changing the label will be enough to negate the odd UX of an enabled checkbox, but muted sound. I also worry that a toggling icon could also muddy things a bit. Regardless, I don't think these approaches will generalize to Fourier: Making Waves which will also have a volume slider in addition to the checkbox.

We weren't too hip on the idea of automatically un-checking the sound box when the global sound is disabled. It seems like disabling sound should mute whatever is happening, and then un-muting should restore the previous situation

I'm not a huge fan of changing the checkbox state, either. I think the UX is a bit clunky and unexpected. There are likely situations where a user may want to temporarily mute the sim, and it would be frustrating to have to go re-check something to restore the state after un-muting.

My personal preference would still be to set the enabledProperty of the sound-related UI element(s) to false when sound is muted from the navbar. It could work for Waves Intro and Fourier: Making Waves, and it just seems like the simplest solution. I think the disabled look of the UI component is enough to cue that the feature is not currently available (even if it is checked and disabled).

I think it would be good to have a short design meeting to discuss this further and decide what the next steps are in regards to publication. I'll make a request for time at next week's design meeting.

samreid commented 3 years ago

My personal preference would still be to set the enabledProperty of the sound-related UI element(s) to false when sound is muted from the navbar.

I implemented that in the commit so we can review/discuss it.

arouinfar commented 3 years ago

Reviewed in the 11/12/20 design meeting with @kathy-phet @samreid @jbphet and @pixelzoom.

The team reviewed the version that @samreid pushed to master (setting the enabledProperty of the checkbox to false when sound is muted from the navbar). This behavior looked reasonable, and could generalize to situations like Fourier: Making Waves which will also have a volume slider.

In terms of PhET-iO, there could be a situation where a client wants to control the enabledProperty of the sound-related checkboxes, and toggling the mute button in the navbar will override their customization. There is precedent for handling this sort of situation in other sims, such as the neutralIndicatorNode in ph-scale (https://github.com/phetsims/ph-scale/issues/102) and the phaseDiagramContainer in states-of-matter (https://github.com/phetsims/states-of-matter/issues/332).

@samreid I believe the decision was that you would make a note to future self/developer in the code, so reassigning to you.

samreid commented 3 years ago

I moved this issue to "wave-interference" repo since that's where the code is and so we can associate it with the milestone.

emily-phet commented 3 years ago

@arouinfar Just a thought - I'll defer to your decision on this.

I agree that having the Play Tone checkbox checked + global sound disabled (=Play Tone sound not perceivable) does not visually cue why the enabled feature does not result in sound (or anything). Totally agree.

With that noted, this is behavior of every other instance in a web browser when something should be playing sound. For example, video players, browser-based games, etc. As a general solution across sims, we may not be able to - in all cases - make something that toggles a sound appear disabled. So the solution you're in the process of implementing may not generalize beyond cases where there is a single sound-enabling checkbox (or something very similar) in the sim. For the long-term use of sound in sims, it would be simplest, and consistent with all other basic webpage interfaces, that global sound off is not visually cued beyond the appearance of the global sound button.

If you proceed as planned, which I'm guessing you will (and that's fine, not trying to pressure!), I just want to be clear we should not consider this decision to be generalizable beyond basic checkboxes and similar going forward. I'd prefer to avoid situations where we're spending considerable effort to figure out how to visually disable things that are more complex than a checkbox, and doing so because we think this is a requirement since we set the precedent that we cue global sound off visually.

samreid commented 3 years ago

I added notes to describe the detail in https://github.com/phetsims/wave-interference/issues/507#issuecomment-726936679. @arouinfar can you please review the preceding comment and recommend how to proceed (a) for Waves Intro and (b) in general? If Waves Intro is good with respect to this issue, let's close it. If more discussion is warranted, perhaps it could be moved to the sonification repo?

arouinfar commented 3 years ago

I just want to be clear we should not consider this decision to be generalizable beyond basic checkboxes and similar going forward. I'd prefer to avoid situations where we're spending considerable effort to figure out how to visually disable things that are more complex than a checkbox, and doing so because we think this is a requirement since we set the precedent that we cue global sound off visually.

I completely agree @emily-phet. I think the case we're considering here is pretty narrow, and I don't think it's a pattern we can or should generalize more broadly. There is a sound in these sims (literal sine wave sound) that we want users to be able to opt-out of separately from the rest of the other sounds, and it's done with a simple UI element.

@samreid we can proceed as planned for Waves Intro.

I don't see the decisions we're making here to be a global pattern, and I think any further discussion would be hypothetical. I think we can go ahead and close this issue, but thanks for your thoughts @emily-phet!