Closed samreid closed 1 year ago
Labeling for design meeting to determine priority/timeline
Design meeting 11/30/22 @arouinfar @samreid @matthew-blackman
There is some benefit in allowing instructional designers to customize the archetypes, and we would like to include it in this milestone.
Caveats
We discussed this in https://github.com/phetsims/phet-io/issues/1856#issuecomment-1371353323, the main decisions for this release are:
elementCreatedEmitter
to customize new elements in a custom wrapper.We also talked about a parallel solution for creating non-archetype defaults "Property" instances, but it seems too much like a parallel workaround. But now I'm wondering why the phetioArchetypeCustomizable elements aren't implemented like that somehow. Can we just create those ones? Or will that have all the baggage of the whole solution anyways?
Here is a line of code that customizes elements as they are created:
phetioClient.invoke(
'circuitConstructionKitDc.introScreen.model.circuit.resistorGroup.elementCreatedEmitter',
'addListener', [
( state, phetioID ) => phetioClient.invoke( phetioID + '.isEditableProperty', 'setValue', [ false ] )
]);
It can be pasted in the chrome dev tools while running studio. Or it can be added to a wrapper. Or after running Studio => Test, you can paste it in the launched sim. All of these cases work as expected. This seems like a workable solution that is flexible and easy to describe, and already well-supported. If a client requires a UI for customizing defaults or archetypes in studio, we can add a UI for this, or we can reconsider https://github.com/phetsims/phet-io/issues/1856.
@arouinfar can you please test this, and add a note about this to the sim-specific documentation? Or show me where I can do so?
I made a note of this in https://github.com/phetsims/circuit-construction-kit-common/issues/865, perhaps this issue can be closed and we will continue in https://github.com/phetsims/circuit-construction-kit-common/issues/865? Up to @arouinfar
Thanks @samreid! I tested it out in the console and it worked well. I copied your comment over into #865 to make it easier to find when writing up the examples doc. I don't think there's anything else to do in this issue, closing.
For https://github.com/phetsims/phet-io/issues/1856