Closed KatieWoe closed 1 year ago
I'll take a look before tossing this one to our resident sound expert.
@matthew-blackman and I were able to figure out the problem, but we aren't exactly sure what the best solution is. Basically the sound engine is doing a good job at silencing sound while the state engine is setting state, but in this case, the dialog is being cleared in the "before state set" hook, and that deletion closes dialog, and starts the close sound.
I would like to implicate @samreid to the next part of this conversation, and will likely discuss in about 5 minutes with him and @matthew-blackman.
Fixed by commits over in https://github.com/phetsims/phet-io/issues/1906. Thanks @samreid and @matthew-blackman for helping to get this solved. Commits over in that repo for cherry pick.
Wait. I also still hear another problem with the state engine where I hear the very first open sound. I'll keep investigating.
UPDATE: I heard it while testing an older version of the changes, I cannot reproduce with the new fixes in place. Nevermind!!
OK, 4 commits were cherry-picked from https://github.com/phetsims/phet-io/issues/1906.
I don't know how to test this one, but opened a dialog in studio in the 1.6 SHAs and pressed "test" and nothing was obviously broken.
Ready to verify.
I no longer hear sounds in the downstream sim. However, @jessegreenberg I don't think Katie's original question was ever answered. Is having a dialog open supposed to be stateful? I just compared the behavior in Friction to Beer's Law 1.7.0-rc.2. and it is the same. If that is the intended behavior, then this issue can be closed.
I tried to find the answer in https://phet-dev.colorado.edu/html/friction/1.6.0-rc.1/phet-io/doc/guides/phet-io-guide.html#preferences-customization but couldn't find anything specific about the dialog state (just individual preferences). So I believe Dialog's isShowingProperty is meant to be stateful and this is correct.
@arouinfar can you please confirm?
That's correct @jessegreenberg. Every dialog's isShowingProperty
is stateful, regardless of what type of dialog it is. For Preferences, specifically, selectedTabProperty
is also stateful. I reviewed the Friction RC and it is behaving as intended, closing.
Device Dell OS Win 11 Browser Chrome Problem Description For https://github.com/phetsims/qa/issues/886. From Slack:
In addition to this, when the state is set, the open dialog sound plays, which seems wrong.
Steps to Reproduce
Visuals
https://user-images.githubusercontent.com/41024075/214445596-cc91f1b9-a16b-4914-8b33-877fa745efea.MOV