Closed jessegreenberg closed 3 weeks ago
I saw this comment in dialog, so while it wouldn't hurt it is definitely not needed for it's largest use case which is Dialog
.
// turn off default sound generation, Dialog will create its own sounds
soundPlayer: nullSoundPlayer,
The closeButton is currently only being used in Dialog
and older javascript sims. The default styling of it also does not seem like it is up to date with our design aesthetic.
Neuron Usage:
Dialog Usage:
Since this is regarding a scenery-phet component I'm going to move this issue there, but I think it is ultimately the decision of the responsible dev for that repo which is @jessegreenberg.
@jessegreenberg I'm happy to add the generalCloseSoundPlayer
to CloseButton
if you decide we should proceed with that.
Thanks @marlitas - I think it should. Ill add it and then remove the usage in mean-share-and-balance (and any others I can find). This will result in a behavior change for cases like Neuron as you have shown, and since it relates to sound Ill see if @jbphet is available for review.
Commits made above. I looked for other usages of CloseButton to see if there were any sound conflicts with custom sounds but didn't notice any.
@jbphet would you mind reviewing, are you OK with adding this default sound to CloseButton?
This definitely seems appropriate. The commits look good, and I test drove it in the Mean Info Dialog in mean-share-and-balance, and it sounds good. Closing.
This option is passed to the CloseButton, should it use this soundPlayer by default?
For phetsims/mean-share-and-balance#270