Remove Tandem.GroupTandem and previous state pattern
Closed this issue · 1 comments
From phetsims/tandem#87, we need to eliminate usages of createGroupTandem
. Things should be converted to use PhetioGroup
if necessary. I'll follow the instrumentation guide:
Here is an ordered list of how to approach instrumenting an element that is dynamically created:
- Does it even need instrumentation? Often instances don't need to be instrumented, or can perhaps be instrumented as a component of their parent (instead of being instrumented themselves)
- Can it be created eagerly? Allocating dynamic elements on startup simplifies the instrumentation process, especially
when supporting PhET-iO state and API validation.- Instrument the object dynamically, using
PhetioGroup
orPhetioCapsule
. UsePhetioCapsule
for single dynamic
instances. UsePhetioGroup
for multiple instances of the same type. If you have a use case that is not addressed by one or both of those, then please consult with the PhET-iO subteam, and potentially create a new IO Type suitable for your simulation.
For the last commit "opt out", I specified Tandem.OPT_OUT
for the 2 primary containers. The game is not currently added for PhET-iO, nor is it running for PhET-iO. I think when we instrument the game fully it will need more consideration. But for now to move phetsims/tandem#87 along, I used OPT_OUT
, but left them as marker for the spots that may need attention during game instrumentation. That's everything for this issue, unless @zepumph wants to reopen for review.