-
Notifications
You must be signed in to change notification settings - Fork 12
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
Remove the mutate from Voicing and similar traits #1316
Comments
I found the issue where we added support for options to I think we discussed a concern that calling I think what we really need to do is say that anything that mixes Voicing.js cannot call Lets discuss again before proceeding with changes. |
Discussed with @zepumph - The description in #1316 (comment) is correct. But we also want to avoid calling We will continue with this issue and add documentation to Voicing.js to describe that options cannot be passed to the |
I just ran into this while working on #1283, so I'm going to go ahead and handle it as part of that work. |
…s should be set by mutate after initialization, phetsims/scenery#1316
…s should be set by mutate after initialization, phetsims/scenery#1316
…s should be set by mutate after initialization, phetsims/scenery#1316
…s should be set by mutate after initialization, phetsims/scenery#1316
@jessegreenberg, I'm pretty sure that I converted to this pattern and refactored correctly, but will you make sure. I think the most important file to review is Voicing.js, and to make sure there isn't any more documentation to add about how to use the type. Again noting here that Paintable, and other mixins that add mutator keys have the same constraint, so this is an established pattern in scenery. |
…s should be set by mutate after initialization, phetsims/scenery#1316
…s should be set by mutate after initialization, phetsims/scenery#1316
…s should be set by mutate after initialization, #1316
These commits make sense to me. I scanned the project for other places where voicing options were used in a super call but could not find any that did not follow the pattern described here.
This is my understanding as well. Thanks for doing this! |
It results in mutating everything twice and shouldn't be the general pattern. Instead, we should rely on mutate to be called after initializing the voicing trait in the constructor of whatever type is composing. For example, see this in ComboBox
The text was updated successfully, but these errors were encountered: