-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support uninstrumented PhetioDynamicElementContainers #184
Comments
…ontainers must be instrumented, phetsims/tandem#184
Tagging @samreid and @chrisklus to see what we think the usage of PhetioDynamicElementContainers should be. Are we "allowed" to have uninstrumented ones lying around the project? My instinct is yes, we should support that. I feel this even more strongly due to the assertion above. Why does that instance of KeyboardHelpButton fail in phet brand just because of a phet-io implementation detail. This may be as easy as making the phetioType an optional arg to |
Yes, it seems we should allow PhetioGroups to be uninstrumented, we may find reasons to |
@zepumph can you please take next steps for this issue? Or assign me back if I should. |
It will be a very long time before I get to this. |
I applied a workaround (aka "hack") for this in phetsims/energy-skate-park@6088ad3, where I mocked up the PhetioGroup interface to "uninstrument" it. |
Per 12/7/23 PhET-iO Meeting, this is a minor bug and can be addressed if it arises in the future. |
Over in https://github.com/phetsims/phet-io/issues/1679, we added code that will opt out of setting phet-io metadata, like
phetioType
when a PhetioObject isn't instrumented. This broke our implementations ofPhetioDynamicElementContainer
because they rely on passingphetioType.parameterTypes[0]
tocreateDynamicElement
.I think this is the right direction, despite an error we had in joist demo with an uninstrumented KeyboardHelpButton:
We should work on making sure that these types can be flexible if a tandem is not immediately passed in to them (in phet brand at least).
For right now, I just instrumented the KeyboardHelpButton in the joist demo, this way we don't have this issue.
I think long term we may want to be more flexible, and not access (or be graceful about accessing) phetio properties. This will promote a better library-feel and cause less phet-io "gotchas".
I will add specific assertions right now, and link them to this issue.
The text was updated successfully, but these errors were encountered: