phetsims / tandem

Simulation-side code for PhET-iO
MIT License
0 stars 5 forks source link

Suggested improvements to addLinkedElement #291

Closed pixelzoom closed 1 year ago

pixelzoom commented 1 year ago

The current API for PhetioObject addLinkedElement is:

export type LinkableElement = Pick<PhetioObject, 'phetioFeatured' | 'isPhetioInstrumented'>;

type LinkedElementOptions = PhetioObjectOption
...
public addLinkedElement( element: LinkableElement, options?: LinkedElementOptions ): void

Two suggested improvements:


this.addLinkedElement( someElement, {
  tandem: this.tandem.createTandem( someElement.tandem.name )
} );  

That's boilerplate, much of it unnecessary. Change the implementation of addLinkedElement so that the above can be written as:

this.addLinkedElement( someElement );

... and addLinkedElement defaults the tandem to this.tandem.createTandem( someElement.tandem.name ).

This would also address the problem that options? is optional, but addLinkedElement fails if you don't provide options.tandem.


const foo = ...;

this.addLinkedElement( someElement, {
  tandem: foo.tandem.createTandem( someElement.tandem.name )
} );  
samreid commented 1 year ago

Tagging for https://github.com/phetsims/phet-io/issues/1914 and self-unassigning.

samreid commented 1 year ago

This would come in handy for https://github.com/phetsims/center-and-variability/issues/204

samreid commented 1 year ago

I'm enjoying this patch very much:

```diff Subject: [PATCH] Add linked elements, see https://github.com/phetsims/center-and-variability/issues/204 --- Index: main/center-and-variability/js/common/view/PredictionSlider.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/center-and-variability/js/common/view/PredictionSlider.ts b/main/center-and-variability/js/common/view/PredictionSlider.ts --- a/main/center-and-variability/js/common/view/PredictionSlider.ts (revision f2941dc88774d5274cb83bc9ef8722dae0748184) +++ b/main/center-and-variability/js/common/view/PredictionSlider.ts (date 1686799734992) @@ -48,9 +48,7 @@ super( options ); - this.addLinkedElement( predictionProperty, { - tandem: options.tandem.createTandem( 'predictionProperty' ) - } ); + this.addLinkedElement( predictionProperty ); // In view coordinates const dragPositionProperty = new Vector2Property( modelViewTransform.modelToViewXY( predictionProperty.value, 0 ) ); Index: main/beers-law-lab/js/concentration/view/ShakerNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/concentration/view/ShakerNode.ts b/main/beers-law-lab/js/concentration/view/ShakerNode.ts --- a/main/beers-law-lab/js/concentration/view/ShakerNode.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/concentration/view/ShakerNode.ts (date 1686800464955) @@ -88,7 +88,7 @@ } ) ); this.addLinkedElement( shaker, { - tandem: options.tandem.createTandem( 'shaker' ) + tandemName: 'shaker' } ); } Index: main/greenhouse-effect/js/common/view/DefaultTemperatureUnitsSelector.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/greenhouse-effect/js/common/view/DefaultTemperatureUnitsSelector.ts b/main/greenhouse-effect/js/common/view/DefaultTemperatureUnitsSelector.ts --- a/main/greenhouse-effect/js/common/view/DefaultTemperatureUnitsSelector.ts (revision 45349d0459f1d6c91bf1408c989410c19862d0c4) +++ b/main/greenhouse-effect/js/common/view/DefaultTemperatureUnitsSelector.ts (date 1686800465014) @@ -76,9 +76,7 @@ this.children = [ text, radioButtonGroup ]; - this.addLinkedElement( defaultTemperatureUnitsProperty, { - tandem: options.tandem.createTandem( defaultTemperatureUnitsProperty.tandem.name ) - } ); + this.addLinkedElement( defaultTemperatureUnitsProperty ); this.disposeDefaultTemperatureUnitsSelector = (): void => { text.dispose(); Index: main/beers-law-lab/js/concentration/view/ConcentrationMeterNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/concentration/view/ConcentrationMeterNode.ts b/main/beers-law-lab/js/concentration/view/ConcentrationMeterNode.ts --- a/main/beers-law-lab/js/concentration/view/ConcentrationMeterNode.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/concentration/view/ConcentrationMeterNode.ts (date 1686800872332) @@ -118,7 +118,7 @@ ], () => updateValue() ); this.addLinkedElement( concentrationMeter, { - tandem: options.tandem.createTandem( 'concentrationMeter' ) + tandemName: 'concentrationMeter' } ); } Index: main/scenery-phet/js/FaucetNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/scenery-phet/js/FaucetNode.ts b/main/scenery-phet/js/FaucetNode.ts --- a/main/scenery-phet/js/FaucetNode.ts (revision 5cc1360c4a025aa36ea681720e3d8763f215011a) +++ b/main/scenery-phet/js/FaucetNode.ts (date 1686800677082) @@ -298,7 +298,7 @@ // Add a link to flowRateProperty, to make it easier to find in Studio. // See https://github.com/phetsims/ph-scale/issues/123 this.addLinkedElement( flowRateProperty, { - tandem: options.tandem.createTandem( 'flowRateProperty' ) + tandemName: 'flowRateProperty' } ); this.disposeFaucetNode = () => { Index: main/circuit-construction-kit-common/js/view/VoltmeterNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/circuit-construction-kit-common/js/view/VoltmeterNode.ts b/main/circuit-construction-kit-common/js/view/VoltmeterNode.ts --- a/main/circuit-construction-kit-common/js/view/VoltmeterNode.ts (revision ac7789949cfe94d5b254c8961e69d501837ab3b7) +++ b/main/circuit-construction-kit-common/js/view/VoltmeterNode.ts (date 1686800464923) @@ -364,7 +364,7 @@ } this.addLinkedElement( voltmeter, { - tandem: this.tandem.createTandem( 'voltmeter' ) + tandemName: 'voltmeter' } ); } Index: main/calculus-grapher/js/common/model/TangentScrubber.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/calculus-grapher/js/common/model/TangentScrubber.ts b/main/calculus-grapher/js/common/model/TangentScrubber.ts --- a/main/calculus-grapher/js/common/model/TangentScrubber.ts (revision 08db488e9603c74044e30ddf61e3aee9c0c80df6) +++ b/main/calculus-grapher/js/common/model/TangentScrubber.ts (date 1686800465004) @@ -36,12 +36,12 @@ this.colorProperty = CalculusGrapherColors.derivativeCurveStrokeProperty; this.addLinkedElement( this.colorProperty, { - tandem: tandem.createTandem( 'colorProperty' ), + tandemName: 'colorProperty', phetioDocumentation: 'Color for the tangent scrubber handle, vertical line, and the bar in the "Slope of Tangent" accordion box.' } ); this.addLinkedElement( this.yDerivativeProperty, { - tandem: tandem.createTandem( 'slopeProperty' ), + tandemName: 'slopeProperty', phetioDocumentation: 'The slope of the tangent line, with is the same as yDerivativeProperty.' } ); } Index: main/calculus-grapher/js/common/model/ReferenceLine.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/calculus-grapher/js/common/model/ReferenceLine.ts b/main/calculus-grapher/js/common/model/ReferenceLine.ts --- a/main/calculus-grapher/js/common/model/ReferenceLine.ts (revision 08db488e9603c74044e30ddf61e3aee9c0c80df6) +++ b/main/calculus-grapher/js/common/model/ReferenceLine.ts (date 1686800153410) @@ -37,12 +37,12 @@ this.lineColorProperty = CalculusGrapherColors.referenceLineStrokeProperty; this.addLinkedElement( this.handleColorProperty, { - tandem: tandem.createTandem( 'handleColorProperty' ), + tandemName: 'handleColorProperty', phetioDocumentation: 'Color of the handle for moving the reference line' } ); this.addLinkedElement( this.lineColorProperty, { - tandem: tandem.createTandem( 'lineColorProperty' ), + tandemName: 'lineColorProperty', phetioDocumentation: 'Color of the vertical reference line' } ); } Index: main/scenery-phet/js/FineCoarseSpinner.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/scenery-phet/js/FineCoarseSpinner.ts b/main/scenery-phet/js/FineCoarseSpinner.ts --- a/main/scenery-phet/js/FineCoarseSpinner.ts (revision 5cc1360c4a025aa36ea681720e3d8763f215011a) +++ b/main/scenery-phet/js/FineCoarseSpinner.ts (date 1686800676965) @@ -159,7 +159,7 @@ // Create a link to associated Property, so it's easier to find in Studio. this.addLinkedElement( numberProperty, { - tandem: options.tandem.createTandem( 'property' ) + tandemName: 'property' } ); // support for binder documentation, stripped out in builds and only runs when ?binder is specified Index: main/calculus-grapher/js/common/model/AreaUnderCurveScrubber.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/calculus-grapher/js/common/model/AreaUnderCurveScrubber.ts b/main/calculus-grapher/js/common/model/AreaUnderCurveScrubber.ts --- a/main/calculus-grapher/js/common/model/AreaUnderCurveScrubber.ts (revision 08db488e9603c74044e30ddf61e3aee9c0c80df6) +++ b/main/calculus-grapher/js/common/model/AreaUnderCurveScrubber.ts (date 1686799992086) @@ -52,22 +52,22 @@ this.negativeFillProperty = CalculusGrapherColors.integralNegativeFillProperty; this.addLinkedElement( this.colorProperty, { - tandem: tandem.createTandem( 'colorProperty' ), + tandemName: 'colorProperty', phetioDocumentation: 'Color for the scrubber handle, vertical line, and accumulation line.' } ); this.addLinkedElement( this.positiveFillProperty, { - tandem: tandem.createTandem( 'positiveFillProperty' ), + tandemName: 'positiveFillProperty', phetioDocumentation: 'Color for positive area in the area plot, and in the "Net Signed Area" accordion box.' } ); this.addLinkedElement( this.negativeFillProperty, { - tandem: tandem.createTandem( 'negativeFillProperty' ), + tandemName: 'negativeFillProperty', phetioDocumentation: 'Color for negative area in the area plot, and in the "Net Signed Area" accordion box.' } ); this.addLinkedElement( this.yIntegralProperty, { - tandem: tandem.createTandem( 'areaUnderCurveProperty' ), + tandemName: 'areaUnderCurveProperty', phetioDocumentation: 'The area under the curve, which is the same as yIntegralProperty.' } ); } Index: main/beers-law-lab/js/concentration/model/Dropper.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/concentration/model/Dropper.ts b/main/beers-law-lab/js/concentration/model/Dropper.ts --- a/main/beers-law-lab/js/concentration/model/Dropper.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/concentration/model/Dropper.ts (date 1686800465010) @@ -114,7 +114,7 @@ } ); this.addLinkedElement( soluteProperty, { - tandem: options.tandem.createTandem( 'soluteProperty' ) + tandemName: 'soluteProperty' } ); } Index: main/beers-law-lab/js/concentration/model/Shaker.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/concentration/model/Shaker.ts b/main/beers-law-lab/js/concentration/model/Shaker.ts --- a/main/beers-law-lab/js/concentration/model/Shaker.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/concentration/model/Shaker.ts (date 1686800464932) @@ -100,7 +100,7 @@ } ); this.addLinkedElement( soluteProperty, { - tandem: options.tandem.createTandem( 'soluteProperty' ) + tandemName: 'soluteProperty' } ); } Index: main/greenhouse-effect/js/common/model/LayersModel.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/greenhouse-effect/js/common/model/LayersModel.ts b/main/greenhouse-effect/js/common/model/LayersModel.ts --- a/main/greenhouse-effect/js/common/model/LayersModel.ts (revision 45349d0459f1d6c91bf1408c989410c19862d0c4) +++ b/main/greenhouse-effect/js/common/model/LayersModel.ts (date 1686800942142) @@ -239,7 +239,7 @@ // Requeted in https://github.com/phetsims/greenhouse-effect/issues/281 energyBalance.addLinkedElement( this.sunEnergySource.outputEnergyRateTracker.energyRateProperty, { - tandem: energyBalance.tandem.createTandem( 'incomingEnergyRateProperty' ) + tandemName: 'incomingEnergyRateProperty' } ); this.groundLayer = new GroundLayer( { @@ -274,7 +274,7 @@ // Requested in https://github.com/phetsims/greenhouse-effect/issues/281 energyBalance.addLinkedElement( this.outerSpace.incomingUpwardMovingEnergyRateTracker.energyRateProperty, { - tandem: energyBalance.tandem.createTandem( 'outgoingEnergyRateProperty' ) + tandemName: 'outgoingEnergyRateProperty' } ); // Create the model component for the FluxMeter if the options indicate that it should be present. Index: main/equality-explorer/js/common/view/EqualityExplorerLockNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/equality-explorer/js/common/view/EqualityExplorerLockNode.ts b/main/equality-explorer/js/common/view/EqualityExplorerLockNode.ts --- a/main/equality-explorer/js/common/view/EqualityExplorerLockNode.ts (revision c0d9c4f1c388616c99872b7e2248b59a17470a92) +++ b/main/equality-explorer/js/common/view/EqualityExplorerLockNode.ts (date 1686800464920) @@ -47,9 +47,7 @@ this.touchArea = this.localBounds.dilatedXY( 5, 10 ); - this.addLinkedElement( lockedProperty, { - tandem: options.tandem.createTandem( lockedProperty.tandem.name ) - } ); + this.addLinkedElement( lockedProperty ); } } Index: main/equality-explorer/js/common/view/SnapshotNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/equality-explorer/js/common/view/SnapshotNode.ts b/main/equality-explorer/js/common/view/SnapshotNode.ts --- a/main/equality-explorer/js/common/view/SnapshotNode.ts (revision c0d9c4f1c388616c99872b7e2248b59a17470a92) +++ b/main/equality-explorer/js/common/view/SnapshotNode.ts (date 1686800465022) @@ -104,9 +104,7 @@ } } ); - this.addLinkedElement( snapshotProperty, { - tandem: options.tandem.createTandem( `${snapshotProperty.tandem.name}` ) - } ); + this.addLinkedElement( snapshotProperty ); } public override dispose(): void { Index: main/natural-selection/js/common/view/GenerationClockNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/natural-selection/js/common/view/GenerationClockNode.ts b/main/natural-selection/js/common/view/GenerationClockNode.ts --- a/main/natural-selection/js/common/view/GenerationClockNode.ts (revision fdb7baed993e47d37adc0492466fa288f1cf045b) +++ b/main/natural-selection/js/common/view/GenerationClockNode.ts (date 1686800499010) @@ -119,7 +119,7 @@ // Create a Studio link to the model this.addLinkedElement( generationClock, { - tandem: options.tandem.createTandem( 'generationClock' ) + tandemName: 'generationClock' } ); } Index: main/natural-selection/js/common/view/FastForwardButton.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/natural-selection/js/common/view/FastForwardButton.ts b/main/natural-selection/js/common/view/FastForwardButton.ts --- a/main/natural-selection/js/common/view/FastForwardButton.ts (revision fdb7baed993e47d37adc0492466fa288f1cf045b) +++ b/main/natural-selection/js/common/view/FastForwardButton.ts (date 1686800499019) @@ -60,7 +60,7 @@ this.fastForwardButtonModel = this.buttonModel; this.addLinkedElement( timeSpeedProperty, { - tandem: options.tandem.createTandem( 'timeSpeedProperty' ) + tandemName: 'timeSpeedProperty' } ); } } Index: main/natural-selection/js/common/view/pedigree/PedigreeGraphNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/natural-selection/js/common/view/pedigree/PedigreeGraphNode.ts b/main/natural-selection/js/common/view/pedigree/PedigreeGraphNode.ts --- a/main/natural-selection/js/common/view/pedigree/PedigreeGraphNode.ts (revision fdb7baed993e47d37adc0492466fa288f1cf045b) +++ b/main/natural-selection/js/common/view/pedigree/PedigreeGraphNode.ts (date 1686800499014) @@ -106,7 +106,7 @@ // Create a Studio link to the model Property that controls which bunny's pedigree is displayed this.addLinkedElement( selectedBunnyProperty, { - tandem: options.tandem.createTandem( 'selectedBunnyProperty' ) + tandemName: 'selectedBunnyProperty' } ); } Index: main/natural-selection/js/common/view/population/DataProbeNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/natural-selection/js/common/view/population/DataProbeNode.ts b/main/natural-selection/js/common/view/population/DataProbeNode.ts --- a/main/natural-selection/js/common/view/population/DataProbeNode.ts (revision fdb7baed993e47d37adc0492466fa288f1cf045b) +++ b/main/natural-selection/js/common/view/population/DataProbeNode.ts (date 1686800499024) @@ -171,7 +171,7 @@ // Create a Studio link to the model this.addLinkedElement( dataProbe, { - tandem: options.tandem.createTandem( 'dataProbe' ) + tandemName: 'dataProbe' } ); } Index: main/natural-selection/js/common/view/population/PopulationNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/natural-selection/js/common/view/population/PopulationNode.ts b/main/natural-selection/js/common/view/population/PopulationNode.ts --- a/main/natural-selection/js/common/view/population/PopulationNode.ts (revision fdb7baed993e47d37adc0492466fa288f1cf045b) +++ b/main/natural-selection/js/common/view/population/PopulationNode.ts (date 1686800571443) @@ -63,7 +63,7 @@ // Create a Studio link to the model this.addLinkedElement( populationModel, { - tandem: options.tandem.createTandem( 'populationModel' ) + tandemName: 'populationModel' } ); this.populationPanel = populationPanel; Index: main/equality-explorer/js/common/view/TermCreatorNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/equality-explorer/js/common/view/TermCreatorNode.ts b/main/equality-explorer/js/common/view/TermCreatorNode.ts --- a/main/equality-explorer/js/common/view/TermCreatorNode.ts (revision c0d9c4f1c388616c99872b7e2248b59a17470a92) +++ b/main/equality-explorer/js/common/view/TermCreatorNode.ts (date 1686800464905) @@ -82,9 +82,7 @@ }; phet.joist.sim.frameStartedEmitter.addListener( frameStartedCallback ); // removeListener after first call - this.addLinkedElement( termCreator, { - tandem: options.tandem.createTandem( termCreator.tandem.name ) - } ); + this.addLinkedElement( termCreator ); } } Index: main/scenery-phet/js/ZoomButtonGroup.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/scenery-phet/js/ZoomButtonGroup.ts b/main/scenery-phet/js/ZoomButtonGroup.ts --- a/main/scenery-phet/js/ZoomButtonGroup.ts (revision 5cc1360c4a025aa36ea681720e3d8763f215011a) +++ b/main/scenery-phet/js/ZoomButtonGroup.ts (date 1686800676972) @@ -130,7 +130,7 @@ zoomLevelProperty.link( zoomLevelListener ); this.addLinkedElement( zoomLevelProperty, { - tandem: options.tandem.createTandem( 'zoomProperty' ) + tandemName: 'zoomProperty' } ); this.disposeZoomButtonGroup = () => { Index: main/equality-explorer/js/common/model/Variable.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/equality-explorer/js/common/model/Variable.ts b/main/equality-explorer/js/common/model/Variable.ts --- a/main/equality-explorer/js/common/model/Variable.ts (revision c0d9c4f1c388616c99872b7e2248b59a17470a92) +++ b/main/equality-explorer/js/common/model/Variable.ts (date 1686800464977) @@ -64,7 +64,7 @@ } ); this.addLinkedElement( symbolProperty, { - tandem: options.tandem.createTandem( 'symbolProperty' ) + tandemName: 'symbolProperty' } ); } Index: main/density-buoyancy-common/js/common/view/VolumeUnitsControl.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/density-buoyancy-common/js/common/view/VolumeUnitsControl.ts b/main/density-buoyancy-common/js/common/view/VolumeUnitsControl.ts --- a/main/density-buoyancy-common/js/common/view/VolumeUnitsControl.ts (revision 25e6f34bee74d265cfc25933e00c45a4c90d147e) +++ b/main/density-buoyancy-common/js/common/view/VolumeUnitsControl.ts (date 1686800464936) @@ -45,9 +45,7 @@ super( options ); - this.addLinkedElement( beakerUnitsProperty, { - tandem: options.tandem.createTandem( beakerUnitsProperty.tandem.name ) - } ); + this.addLinkedElement( beakerUnitsProperty ); this.disposeVolumeUnitsControl = (): void => { labelText.dispose(); Index: main/density-buoyancy-common/js/common/view/ComboNumberControl.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/density-buoyancy-common/js/common/view/ComboNumberControl.ts b/main/density-buoyancy-common/js/common/view/ComboNumberControl.ts --- a/main/density-buoyancy-common/js/common/view/ComboNumberControl.ts (revision 25e6f34bee74d265cfc25933e00c45a4c90d147e) +++ b/main/density-buoyancy-common/js/common/view/ComboNumberControl.ts (date 1686800911008) @@ -238,12 +238,11 @@ } } ); - const numberControlTandem = config.tandem.createTandem( 'numberControl' ); this.numberControl = new NumberControl( config.titleProperty, this.numberProperty, config.range, combineOptions( { - tandem: numberControlTandem + tandem: config.tandem.createTandem( 'numberControl' ) }, config.numberControlOptions ) ); this.numberControl.addLinkedElement( this.property, { - tandem: numberControlTandem.createTandem( 'valueProperty' ) + tandemName: 'valueProperty' } ); this.comboBox = new ComboBox( this.comboProperty, config.comboItems, config.listParent, config.comboBoxOptions ); Index: main/natural-selection/js/common/view/proportions/ProportionsNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/natural-selection/js/common/view/proportions/ProportionsNode.ts b/main/natural-selection/js/common/view/proportions/ProportionsNode.ts --- a/main/natural-selection/js/common/view/proportions/ProportionsNode.ts (revision fdb7baed993e47d37adc0492466fa288f1cf045b) +++ b/main/natural-selection/js/common/view/proportions/ProportionsNode.ts (date 1686800571466) @@ -61,7 +61,7 @@ // Create a Studio link to the model this.addLinkedElement( proportionsModel, { - tandem: options.tandem.createTandem( 'proportionsModel' ) + tandemName: 'proportionsModel' } ); this.proportionsPanel = proportionsPanel; Index: main/sun/js/buttons/RoundToggleButton.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/sun/js/buttons/RoundToggleButton.ts b/main/sun/js/buttons/RoundToggleButton.ts --- a/main/sun/js/buttons/RoundToggleButton.ts (revision c8ecd2292ec1969342653abc25c803aeb98c9fc4) +++ b/main/sun/js/buttons/RoundToggleButton.ts (date 1686800784940) @@ -58,7 +58,7 @@ super( toggleButtonModel, toggleButtonInteractionStateProperty, options ); this.addLinkedElement( property, { - tandem: options.tandem.createTandem( 'property' ) + tandemName: 'property' } ); // sound generation Index: main/joist/js/NavigationBarAudioToggleButton.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/joist/js/NavigationBarAudioToggleButton.ts b/main/joist/js/NavigationBarAudioToggleButton.ts --- a/main/joist/js/NavigationBarAudioToggleButton.ts (revision 86745575d50dac34f405bb9db8c7d9499548adc4) +++ b/main/joist/js/NavigationBarAudioToggleButton.ts (date 1686800464918) @@ -161,7 +161,7 @@ // must be after the button is instrumented this.addLinkedElement( soundEnabledProperty, { - tandem: options.tandem.createTandem( 'property' ) + tandemName: 'property' } ); // pdom attribute lets user know when the toggle is pressed, linked lazily so that an alert isn't triggered Index: main/sun/js/NumberPicker.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/sun/js/NumberPicker.ts b/main/sun/js/NumberPicker.ts --- a/main/sun/js/NumberPicker.ts (revision c8ecd2292ec1969342653abc25c803aeb98c9fc4) +++ b/main/sun/js/NumberPicker.ts (date 1686800784903) @@ -501,7 +501,7 @@ } ); this.addLinkedElement( valueProperty, { - tandem: options.tandem.createTandem( 'valueProperty' ) + tandemName: 'valueProperty' } ); // Mutate options that require bounds after we have children Index: main/natural-selection/js/common/model/ProportionsModel.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/natural-selection/js/common/model/ProportionsModel.ts b/main/natural-selection/js/common/model/ProportionsModel.ts --- a/main/natural-selection/js/common/model/ProportionsModel.ts (revision fdb7baed993e47d37adc0492466fa288f1cf045b) +++ b/main/natural-selection/js/common/model/ProportionsModel.ts (date 1686800499030) @@ -206,7 +206,7 @@ // Create a Studio link this.addLinkedElement( liveBunnyCountsProperty, { - tandem: options.tandem.createTandem( 'currentCountsProperty' ) + tandemName: 'currentCountsProperty' } ); this.currentStartCountsProperty = currentStartCountsProperty; Index: main/density-buoyancy-common/js/common/model/Mass.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/density-buoyancy-common/js/common/model/Mass.ts b/main/density-buoyancy-common/js/common/model/Mass.ts --- a/main/density-buoyancy-common/js/common/model/Mass.ts (revision 25e6f34bee74d265cfc25933e00c45a4c90d147e) +++ b/main/density-buoyancy-common/js/common/model/Mass.ts (date 1686800465028) @@ -536,7 +536,7 @@ this.nameProperty = blockStringMap[ config.tag.name ] || new TinyProperty( '' ); if ( blockStringMap[ config.tag.name ] ) { this.addLinkedElement( this.nameProperty as ReadOnlyProperty, { - tandem: config.tandem.createTandem( 'nameProperty' ) + tandemName: 'nameProperty' } ); } Index: main/sun/js/ToggleSwitch.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/sun/js/ToggleSwitch.ts b/main/sun/js/ToggleSwitch.ts --- a/main/sun/js/ToggleSwitch.ts (revision c8ecd2292ec1969342653abc25c803aeb98c9fc4) +++ b/main/sun/js/ToggleSwitch.ts (date 1686800784914) @@ -341,7 +341,7 @@ // Add a link to the Property that this switch controls this.addLinkedElement( property, { - tandem: options.tandem.createTandem( 'property' ) + tandemName: 'property' } ); // Make the sound players available to external clients that directly set the Property and thus should play the Index: main/center-and-variability/js/common/view/CAVScreenView.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/center-and-variability/js/common/view/CAVScreenView.ts b/main/center-and-variability/js/common/view/CAVScreenView.ts --- a/main/center-and-variability/js/common/view/CAVScreenView.ts (revision f2941dc88774d5274cb83bc9ef8722dae0748184) +++ b/main/center-and-variability/js/common/view/CAVScreenView.ts (date 1686799735014) @@ -221,9 +221,7 @@ } }; - dragIndicatorArrowNode.addLinkedElement( model.dragIndicatorModel.dragIndicatorValueProperty, { - tandem: options.tandem.createTandem( 'dragIndicatorValueProperty' ) - } ); + dragIndicatorArrowNode.addLinkedElement( model.dragIndicatorModel.dragIndicatorValueProperty ); model.dragIndicatorModel.isDragIndicatorVisibleProperty.link( this.updateDragIndicatorNode ); model.dragIndicatorModel.dragIndicatorValueProperty.link( this.updateDragIndicatorNode ); Index: main/sun/js/AquaRadioButtonGroup.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/sun/js/AquaRadioButtonGroup.ts b/main/sun/js/AquaRadioButtonGroup.ts --- a/main/sun/js/AquaRadioButtonGroup.ts (revision c8ecd2292ec1969342653abc25c803aeb98c9fc4) +++ b/main/sun/js/AquaRadioButtonGroup.ts (date 1686800784917) @@ -145,7 +145,7 @@ // Add linked element after the radio button is instrumented this.addLinkedElement( property, { - tandem: options.tandem.createTandem( 'property' ) + tandemName: 'property' } ); this.disposeAquaRadioButtonGroup = () => { Index: main/sun/js/Slider.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/sun/js/Slider.ts b/main/sun/js/Slider.ts --- a/main/sun/js/Slider.ts (revision c8ecd2292ec1969342653abc25c803aeb98c9fc4) +++ b/main/sun/js/Slider.ts (date 1686800784912) @@ -501,14 +501,14 @@ const linkedProperty = options.phetioLinkedProperty || ( valueProperty instanceof ReadOnlyProperty ? valueProperty : null ); if ( linkedProperty ) { this.addLinkedElement( linkedProperty, { - tandem: options.tandem.createTandem( 'valueProperty' ) + tandemName: 'valueProperty' } ); } // must be after the button is instrumented // assert && assert( !this.isPhetioInstrumented() || this.enabledRangeProperty.isPhetioInstrumented() ); !ownsEnabledRangeProperty && this.enabledRangeProperty instanceof ReadOnlyProperty && this.addLinkedElement( this.enabledRangeProperty, { - tandem: options.tandem.createTandem( 'enabledRangeProperty' ) + tandemName: 'enabledRangeProperty' } ); this.mutate( boundsRequiredOptionKeys ); Index: main/sun/js/NumberSpinner.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/sun/js/NumberSpinner.ts b/main/sun/js/NumberSpinner.ts --- a/main/sun/js/NumberSpinner.ts (revision c8ecd2292ec1969342653abc25c803aeb98c9fc4) +++ b/main/sun/js/NumberSpinner.ts (date 1686800784907) @@ -314,7 +314,7 @@ // Create a link to associated Property, so it's easier to find in Studio. Must be after instrumentation this.addLinkedElement( numberProperty, { - tandem: options.tandem.createTandem( 'property' ) + tandemName: 'property' } ); // support for binder documentation, stripped out in builds and only runs when ?binder is specified Index: main/phet-io/js/autoselectTests.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/phet-io/js/autoselectTests.ts b/main/phet-io/js/autoselectTests.ts --- a/main/phet-io/js/autoselectTests.ts (revision fab9bfaa43e4929040cea696fdb7d9b19f66a5ec) +++ b/main/phet-io/js/autoselectTests.ts (date 1686800965512) @@ -195,7 +195,7 @@ tandem: rectangleTandem } ); phetioMouseHitViewRectangle.addLinkedElement( phetioMouseHitViewPositionProperty, { - tandem: rectangleTandem.createTandem( 'linkedElement' ) + tandemName: 'linkedElement' } ); root.addChild( phetioMouseHitViewRectangle ); Index: main/sun/js/Checkbox.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/sun/js/Checkbox.ts b/main/sun/js/Checkbox.ts --- a/main/sun/js/Checkbox.ts (revision c8ecd2292ec1969342653abc25c803aeb98c9fc4) +++ b/main/sun/js/Checkbox.ts (date 1686800784890) @@ -226,7 +226,7 @@ // must be after the Checkbox is instrumented options.phetioLinkProperty && this.addLinkedElement( property, { - tandem: options.tandem.createTandem( 'property' ) + tandemName: 'property' } ); // support for binder documentation, stripped out in builds and only runs when ?binder is specified Index: main/geometric-optics/js/lens/view/LensNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/lens/view/LensNode.ts b/main/geometric-optics/js/lens/view/LensNode.ts --- a/main/geometric-optics/js/lens/view/LensNode.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/lens/view/LensNode.ts (date 1686800464914) @@ -89,9 +89,7 @@ lens.opacityProperty.linkAttribute( fillNode, 'opacity' ); - this.addLinkedElement( lens, { - tandem: options.tandem.createTandem( lens.tandem.name ) - } ); + this.addLinkedElement( lens ); } public override dispose(): void { Index: main/equality-explorer/js/solveit/model/SolveItLevel.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/equality-explorer/js/solveit/model/SolveItLevel.ts b/main/equality-explorer/js/solveit/model/SolveItLevel.ts --- a/main/equality-explorer/js/solveit/model/SolveItLevel.ts (revision c0d9c4f1c388616c99872b7e2248b59a17470a92) +++ b/main/equality-explorer/js/solveit/model/SolveItLevel.ts (date 1686800465019) @@ -136,7 +136,7 @@ } ); this.addLinkedElement( descriptionProperty, { - tandem: options.tandem.createTandem( 'descriptionProperty' ) + tandemName: 'descriptionProperty' } ); } Index: main/sun/js/buttons/RectangularToggleButton.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/sun/js/buttons/RectangularToggleButton.ts b/main/sun/js/buttons/RectangularToggleButton.ts --- a/main/sun/js/buttons/RectangularToggleButton.ts (revision c8ecd2292ec1969342653abc25c803aeb98c9fc4) +++ b/main/sun/js/buttons/RectangularToggleButton.ts (date 1686800784892) @@ -58,7 +58,7 @@ super( toggleButtonModel, toggleButtonInteractionStateProperty, options ); this.addLinkedElement( property, { - tandem: options.tandem.createTandem( 'property' ) + tandemName: 'property' } ); // sound generation Index: main/scenery-phet/js/StopwatchNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/scenery-phet/js/StopwatchNode.ts b/main/scenery-phet/js/StopwatchNode.ts --- a/main/scenery-phet/js/StopwatchNode.ts (revision 5cc1360c4a025aa36ea681720e3d8763f215011a) +++ b/main/scenery-phet/js/StopwatchNode.ts (date 1686800676951) @@ -297,7 +297,7 @@ } this.addLinkedElement( stopwatch, { - tandem: options.tandem.createTandem( 'stopwatch' ) + tandemName: 'stopwatch' } ); this.disposeStopwatchNode = () => { Index: main/sun/js/buttons/RectangularRadioButtonGroup.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/sun/js/buttons/RectangularRadioButtonGroup.ts b/main/sun/js/buttons/RectangularRadioButtonGroup.ts --- a/main/sun/js/buttons/RectangularRadioButtonGroup.ts (revision c8ecd2292ec1969342653abc25c803aeb98c9fc4) +++ b/main/sun/js/buttons/RectangularRadioButtonGroup.ts (date 1686800784938) @@ -87,7 +87,7 @@ 'touchAreaYDilation' | // use SelfOptions.touchAreaYDilation 'mouseAreaXDilation' | // use SelfOptions.mouseAreaXDilation 'mouseAreaYDilation' // use SelfOptions.mouseAreaYDilation - >; + >; }; export type RectangularRadioButtonGroupOptions = SelfOptions & StrictOmit { Index: main/geometric-optics/js/common/view/TwoFPointNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/view/TwoFPointNode.ts b/main/geometric-optics/js/common/view/TwoFPointNode.ts --- a/main/geometric-optics/js/common/view/TwoFPointNode.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/view/TwoFPointNode.ts (date 1686800464876) @@ -37,9 +37,7 @@ this.center = modelViewTransform.modelToViewPosition( twoFPoint ); } ); - this.addLinkedElement( pointProperty, { - tandem: options.tandem.createTandem( pointProperty.tandem.name ) - } ); + this.addLinkedElement( pointProperty ); } /** Index: main/geometric-optics/js/common/view/ProjectionScreenNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/view/ProjectionScreenNode.ts b/main/geometric-optics/js/common/view/ProjectionScreenNode.ts --- a/main/geometric-optics/js/common/view/ProjectionScreenNode.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/view/ProjectionScreenNode.ts (date 1686800153420) @@ -177,9 +177,7 @@ } ) ); this.addInputListener( keyboardDragListener ); - this.addLinkedElement( projectionScreen, { - tandem: options.tandem.createTandem( projectionScreen.tandem.name ) - } ); + this.addLinkedElement( projectionScreen ); this.resetProjectionScreenNode = () => { wasDraggedProperty.reset(); Index: main/sun/js/ComboBox.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/sun/js/ComboBox.ts b/main/sun/js/ComboBox.ts --- a/main/sun/js/ComboBox.ts (revision c8ecd2292ec1969342653abc25c803aeb98c9fc4) +++ b/main/sun/js/ComboBox.ts (date 1686800784898) @@ -418,7 +418,7 @@ } ); this.addLinkedElement( property, { - tandem: options.tandem.createTandem( 'property' ) + tandemName: 'property' } ); this.disposeComboBox = () => { Index: main/center-and-variability/js/median/model/CardModel.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/center-and-variability/js/median/model/CardModel.ts b/main/center-and-variability/js/median/model/CardModel.ts --- a/main/center-and-variability/js/median/model/CardModel.ts (revision f2941dc88774d5274cb83bc9ef8722dae0748184) +++ b/main/center-and-variability/js/median/model/CardModel.ts (date 1686799735004) @@ -38,9 +38,7 @@ phetioValueType: BooleanIO } ); - this.addLinkedElement( this.soccerBall, { - tandem: options.tandem.createTandem( 'soccerBall' ) - } ); + this.addLinkedElement( this.soccerBall ); } } Index: main/states-of-matter/js/common/view/CompositeThermometerNode.js IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/states-of-matter/js/common/view/CompositeThermometerNode.js b/main/states-of-matter/js/common/view/CompositeThermometerNode.js --- a/main/states-of-matter/js/common/view/CompositeThermometerNode.js (revision 3b18e5dd899bd01c7b0302d7b262129a7ba948d1) +++ b/main/states-of-matter/js/common/view/CompositeThermometerNode.js (date 1686800784894) @@ -131,7 +131,7 @@ // Create a link to temperatureInKelvinProperty so it's easier to find in phet-io Studio. this.addLinkedElement( multipleParticleModel.temperatureInKelvinProperty, { - tandem: options.tandem.createTandem( 'temperatureInKelvinProperty' ) + tandemName: 'temperatureInKelvinProperty' } ); } Index: main/joist/js/Screen.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/joist/js/Screen.ts b/main/joist/js/Screen.ts --- a/main/joist/js/Screen.ts (revision 86745575d50dac34f405bb9db8c7d9499548adc4) +++ b/main/joist/js/Screen.ts (date 1686800464991) @@ -191,7 +191,7 @@ // This additional option is needed because designers requested the ability to not instrument a screen's nameProperty // even if it has a name, see https://github.com/phetsims/joist/issues/627 and https://github.com/phetsims/joist/issues/629. options.instrumentNameProperty && this.addLinkedElement( options.name, { - tandem: options.tandem.createTandem( 'nameProperty' ) + tandemName: 'nameProperty' } ); } else { Index: main/geometric-optics/js/common/view/FocalLengthControl.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/view/FocalLengthControl.ts b/main/geometric-optics/js/common/view/FocalLengthControl.ts --- a/main/geometric-optics/js/common/view/FocalLengthControl.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/view/FocalLengthControl.ts (date 1686800153408) @@ -65,9 +65,7 @@ super( titleStringProperty, focalLengthMagnitudeProperty, range, options ); - this.addLinkedElement( focalLengthMagnitudeProperty, { - tandem: options.tandem.createTandem( focalLengthMagnitudeProperty.tandem.name ) - } ); + this.addLinkedElement( focalLengthMagnitudeProperty ); } public override dispose(): void { Index: main/states-of-matter/js/common/view/DialGaugeNode.js IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/states-of-matter/js/common/view/DialGaugeNode.js b/main/states-of-matter/js/common/view/DialGaugeNode.js --- a/main/states-of-matter/js/common/view/DialGaugeNode.js (revision 3b18e5dd899bd01c7b0302d7b262129a7ba948d1) +++ b/main/states-of-matter/js/common/view/DialGaugeNode.js (date 1686800784936) @@ -76,7 +76,7 @@ // Create a link to pressureProperty so it's easier to find in Studio. this.addLinkedElement( multipleParticleModel.pressureProperty, { - tandem: readoutNode.tandem.createTandem( 'pressureProperty' ) + tandemName: 'pressureProperty' } ); // To accurately reproduce the previous version (which consisted of a path stroked with lineWidth 10), we need to Index: main/geometric-optics/js/common/view/IndexOfRefractionControl.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/view/IndexOfRefractionControl.ts b/main/geometric-optics/js/common/view/IndexOfRefractionControl.ts --- a/main/geometric-optics/js/common/view/IndexOfRefractionControl.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/view/IndexOfRefractionControl.ts (date 1686800153421) @@ -47,9 +47,7 @@ super( GeometricOpticsStrings.indexOfRefractionStringProperty, indexOfRefractionProperty, range, options ); - this.addLinkedElement( indexOfRefractionProperty, { - tandem: options.tandem.createTandem( indexOfRefractionProperty.tandem.name ) - } ); + this.addLinkedElement( indexOfRefractionProperty ); } } Index: main/geometric-optics/js/common/view/DiameterControl.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/view/DiameterControl.ts b/main/geometric-optics/js/common/view/DiameterControl.ts --- a/main/geometric-optics/js/common/view/DiameterControl.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/view/DiameterControl.ts (date 1686800153415) @@ -44,9 +44,7 @@ super( GeometricOpticsStrings.diameterStringProperty, diameterProperty, range, options ); - this.addLinkedElement( diameterProperty, { - tandem: options.tandem.createTandem( diameterProperty.tandem.name ) - } ); + this.addLinkedElement( diameterProperty ); } } Index: main/geometric-optics/js/common/view/LightSpotNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/view/LightSpotNode.ts b/main/geometric-optics/js/common/view/LightSpotNode.ts --- a/main/geometric-optics/js/common/view/LightSpotNode.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/view/LightSpotNode.ts (date 1686800153424) @@ -93,9 +93,7 @@ fillAndStrokeNode.clipArea = modelViewTransform.modelToViewShape( projectionScreenShape ); } ); - this.addLinkedElement( lightSpot, { - tandem: providedOptions.tandem.createTandem( lightSpot.tandem.name ) - } ); + this.addLinkedElement( lightSpot ); } public override dispose(): void { Index: main/geometric-optics/js/common/view/FocalPointNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/view/FocalPointNode.ts b/main/geometric-optics/js/common/view/FocalPointNode.ts --- a/main/geometric-optics/js/common/view/FocalPointNode.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/view/FocalPointNode.ts (date 1686800153435) @@ -39,9 +39,7 @@ this.center = modelViewTransform.modelToViewPosition( focalPoint ); } ); - this.addLinkedElement( pointProperty, { - tandem: options.tandem.createTandem( pointProperty.tandem.name ) - } ); + this.addLinkedElement( pointProperty ); } /** Index: main/geometric-optics/js/common/view/OpticalImageNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/view/OpticalImageNode.ts b/main/geometric-optics/js/common/view/OpticalImageNode.ts --- a/main/geometric-optics/js/common/view/OpticalImageNode.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/view/OpticalImageNode.ts (date 1686800153423) @@ -50,9 +50,7 @@ super( options ); - this.addLinkedElement( opticalImage, { - tandem: providedOptions.tandem.createTandem( opticalImage.tandem.name ) - } ); + this.addLinkedElement( opticalImage ); } public override dispose(): void { Index: main/geometric-optics/js/common/view/GOSceneNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/view/GOSceneNode.ts b/main/geometric-optics/js/common/view/GOSceneNode.ts --- a/main/geometric-optics/js/common/view/GOSceneNode.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/view/GOSceneNode.ts (date 1686800153413) @@ -219,9 +219,7 @@ guidesLayer ]; - this.addLinkedElement( scene, { - tandem: options.tandem.createTandem( scene.tandem.name ) - } ); + this.addLinkedElement( scene ); this.opticJumpPoints = [ new ToolJumpPoint( scene.optic.positionProperty, opticNode.visibleProperty ), Index: main/geometric-optics/js/common/view/FocalLengthModelTypeControl.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/view/FocalLengthModelTypeControl.ts b/main/geometric-optics/js/common/view/FocalLengthModelTypeControl.ts --- a/main/geometric-optics/js/common/view/FocalLengthModelTypeControl.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/view/FocalLengthModelTypeControl.ts (date 1686800153404) @@ -60,9 +60,7 @@ this.children = [ labelText, radioButtonGroup ]; - this.addLinkedElement( focalLengthModelTypeProperty, { - tandem: options.tandem.createTandem( focalLengthModelTypeProperty.tandem.name ) - } ); + this.addLinkedElement( focalLengthModelTypeProperty ); this.disposeFocalLengthModelTypeControl = (): void => { labelText.dispose(); Index: main/geometric-optics/js/common/view/OpticalObjectNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/view/OpticalObjectNode.ts b/main/geometric-optics/js/common/view/OpticalObjectNode.ts --- a/main/geometric-optics/js/common/view/OpticalObjectNode.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/view/OpticalObjectNode.ts (date 1686800153431) @@ -72,9 +72,7 @@ } } ); - this.addLinkedElement( opticalObject, { - tandem: options.tandem.createTandem( opticalObject.tandem.name ) - } ); + this.addLinkedElement( opticalObject ); } /** Index: main/ph-scale/js/macro/view/MacroPHMeterNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/ph-scale/js/macro/view/MacroPHMeterNode.ts b/main/ph-scale/js/macro/view/MacroPHMeterNode.ts --- a/main/ph-scale/js/macro/view/MacroPHMeterNode.ts (revision 1e218bb75409935ab858cb74e9c18f6d10ffcc11) +++ b/main/ph-scale/js/macro/view/MacroPHMeterNode.ts (date 1686800677016) @@ -126,7 +126,7 @@ // Create a link to pHProperty, so it's easier to find in Studio. this.addLinkedElement( meter.pHProperty, { - tandem: options.tandem.createTandem( 'pHProperty' ) + tandemName: 'phProperty' } ); } } Index: main/scenery/js/accessibility/pdom/ParallelDOM.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/scenery/js/accessibility/pdom/ParallelDOM.ts b/main/scenery/js/accessibility/pdom/ParallelDOM.ts --- a/main/scenery/js/accessibility/pdom/ParallelDOM.ts (revision f31bbfcf0f239539cbe33e1294d129492919564e) +++ b/main/scenery/js/accessibility/pdom/ParallelDOM.ts (date 1686800784933) @@ -2879,8 +2879,10 @@ oldProperty && oldProperty instanceof ReadOnlyProperty && oldProperty.isPhetioInstrumented() && oldProperty instanceof PhetioObject && this.removeLinkedElements( oldProperty ); const tandem = this.tandem.createTandem( tandemName ); + + // TODO: https://github.com/phetsims/tandem/issues/291 this tandem comparison could be dubious if new Tandem() is ever used. if ( newProperty && newProperty instanceof ReadOnlyProperty && newProperty.isPhetioInstrumented() && newProperty instanceof PhetioObject && tandem !== newProperty.tandem ) { - this.addLinkedElement( newProperty, { tandem: tandem } ); + this.addLinkedElement( newProperty, { tandemName: tandemName } ); } } } Index: main/geometric-optics/js/common/view/SecondPointNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/view/SecondPointNode.ts b/main/geometric-optics/js/common/view/SecondPointNode.ts --- a/main/geometric-optics/js/common/view/SecondPointNode.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/view/SecondPointNode.ts (date 1686800464940) @@ -86,9 +86,7 @@ } ) ); this.addInputListener( keyboardDragListener ); - this.addLinkedElement( secondPoint, { - tandem: options.tandem.createTandem( secondPoint.tandem.name ) - } ); + this.addLinkedElement( secondPoint ); } /** Index: main/acid-base-solutions/js/common/view/MagnifyingGlassNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/acid-base-solutions/js/common/view/MagnifyingGlassNode.ts b/main/acid-base-solutions/js/common/view/MagnifyingGlassNode.ts --- a/main/acid-base-solutions/js/common/view/MagnifyingGlassNode.ts (revision fd4acdd3bb8819e4fc5269ca43a0c70072aac1bc) +++ b/main/acid-base-solutions/js/common/view/MagnifyingGlassNode.ts (date 1686799817188) @@ -110,9 +110,7 @@ // Update when this Node becomes visible. this.visibleProperty.link( visible => visible && this.updateParticles() ); - this.addLinkedElement( magnifyingGlass, { - tandem: tandem.createTandem( magnifyingGlass.tandem.name ) - } ); + this.addLinkedElement( magnifyingGlass ); } public override dispose(): void { Index: main/reactants-products-and-leftovers/js/common/view/RPALSceneNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/reactants-products-and-leftovers/js/common/view/RPALSceneNode.ts b/main/reactants-products-and-leftovers/js/common/view/RPALSceneNode.ts --- a/main/reactants-products-and-leftovers/js/common/view/RPALSceneNode.ts (revision a7635a3786e4a760640c724e55663bcf2a8a18ee) +++ b/main/reactants-products-and-leftovers/js/common/view/RPALSceneNode.ts (date 1686800464929) @@ -129,9 +129,7 @@ super( options ); - this.addLinkedElement( reaction, { - tandem: options.tandem.createTandem( reaction.tandem.name ) - } ); + this.addLinkedElement( reaction ); this.disposeBeforeAfterNode = () => { beforeAccordionBox.dispose(); Index: main/ph-scale/js/micro/view/MicroPHAccordionBox.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/ph-scale/js/micro/view/MicroPHAccordionBox.ts b/main/ph-scale/js/micro/view/MicroPHAccordionBox.ts --- a/main/ph-scale/js/micro/view/MicroPHAccordionBox.ts (revision 1e218bb75409935ab858cb74e9c18f6d10ffcc11) +++ b/main/ph-scale/js/micro/view/MicroPHAccordionBox.ts (date 1686800676978) @@ -49,7 +49,7 @@ super( contentNode, probeYOffset, providedOptions ); this.addLinkedElement( pHProperty, { - tandem: providedOptions.tandem.createTandem( 'pHProperty' ) + tandemName: 'pHProperty' } ); } } Index: main/acid-base-solutions/js/common/view/ABSConductivityTesterNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/acid-base-solutions/js/common/view/ABSConductivityTesterNode.ts b/main/acid-base-solutions/js/common/view/ABSConductivityTesterNode.ts --- a/main/acid-base-solutions/js/common/view/ABSConductivityTesterNode.ts (revision fd4acdd3bb8819e4fc5269ca43a0c70072aac1bc) +++ b/main/acid-base-solutions/js/common/view/ABSConductivityTesterNode.ts (date 1686799734999) @@ -37,9 +37,7 @@ tandem: tandem } ); - this.addLinkedElement( conductivityTester, { - tandem: tandem.createTandem( conductivityTester.tandem.name ) - } ); + this.addLinkedElement( conductivityTester ); } public override dispose(): void { Index: main/geometric-optics/js/common/view/RadiusOfCurvatureControl.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/view/RadiusOfCurvatureControl.ts b/main/geometric-optics/js/common/view/RadiusOfCurvatureControl.ts --- a/main/geometric-optics/js/common/view/RadiusOfCurvatureControl.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/view/RadiusOfCurvatureControl.ts (date 1686800464944) @@ -65,9 +65,7 @@ super( titleStringProperty, radiusOfCurvatureMagnitudeProperty, range, options ); - this.addLinkedElement( radiusOfCurvatureMagnitudeProperty, { - tandem: options.tandem.createTandem( radiusOfCurvatureMagnitudeProperty.tandem.name ) - } ); + this.addLinkedElement( radiusOfCurvatureMagnitudeProperty ); } public override dispose(): void { Index: main/acid-base-solutions/js/common/view/ViewsPanel.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/acid-base-solutions/js/common/view/ViewsPanel.ts b/main/acid-base-solutions/js/common/view/ViewsPanel.ts --- a/main/acid-base-solutions/js/common/view/ViewsPanel.ts (revision fd4acdd3bb8819e4fc5269ca43a0c70072aac1bc) +++ b/main/acid-base-solutions/js/common/view/ViewsPanel.ts (date 1686799817182) @@ -154,7 +154,7 @@ } ); radioButtonGroup.addLinkedElement( viewModeProperty, { - tandem: radioButtonGroupTandem.createTandem( 'property' ) + tandemName: 'property' } ); const content = new AlignBox( new VBox( { Index: main/acid-base-solutions/js/common/view/PHPaperNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/acid-base-solutions/js/common/view/PHPaperNode.ts b/main/acid-base-solutions/js/common/view/PHPaperNode.ts --- a/main/acid-base-solutions/js/common/view/PHPaperNode.ts (revision fd4acdd3bb8819e4fc5269ca43a0c70072aac1bc) +++ b/main/acid-base-solutions/js/common/view/PHPaperNode.ts (date 1686799817185) @@ -109,9 +109,7 @@ this.pHPaper = pHPaper; this.animating = false; - this.addLinkedElement( pHPaper, { - tandem: tandem.createTandem( pHPaper.tandem.name ) - } ); + this.addLinkedElement( pHPaper ); } public override dispose(): void { Index: main/geometric-optics/js/common/view/tools/GOToolNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/view/tools/GOToolNode.ts b/main/geometric-optics/js/common/view/tools/GOToolNode.ts --- a/main/geometric-optics/js/common/view/tools/GOToolNode.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/view/tools/GOToolNode.ts (date 1686800464952) @@ -70,9 +70,7 @@ this.jumpPoints = []; this.jumpPointsIndex = 0; - this.addLinkedElement( tool, { - tandem: options.tandem.createTandem( tool.tandem.name ) - } ); + this.addLinkedElement( tool ); } /** Index: main/acid-base-solutions/js/common/view/LogSlider.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/acid-base-solutions/js/common/view/LogSlider.ts b/main/acid-base-solutions/js/common/view/LogSlider.ts --- a/main/acid-base-solutions/js/common/view/LogSlider.ts (revision fd4acdd3bb8819e4fc5269ca43a0c70072aac1bc) +++ b/main/acid-base-solutions/js/common/view/LogSlider.ts (date 1686799735017) @@ -48,7 +48,7 @@ // Because linearValueProperty is adapting between linear and log scales, link logValueProperty so that // this looks like a standard PhET-iO Slider. this.addLinkedElement( logValueProperty, { - tandem: providedOptions.tandem.createTandem( 'valueProperty' ) + tandemName: 'valueProperty' } ); this.disposeLogSlider = () => { Index: main/acid-base-solutions/js/common/view/PHMeterNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/acid-base-solutions/js/common/view/PHMeterNode.ts b/main/acid-base-solutions/js/common/view/PHMeterNode.ts --- a/main/acid-base-solutions/js/common/view/PHMeterNode.ts (revision fd4acdd3bb8819e4fc5269ca43a0c70072aac1bc) +++ b/main/acid-base-solutions/js/common/view/PHMeterNode.ts (date 1686799817184) @@ -111,9 +111,7 @@ this.translation = position; } ); - this.addLinkedElement( pHMeter, { - tandem: tandem.createTandem( pHMeter.tandem.name ) - } ); + this.addLinkedElement( pHMeter ); } public override dispose(): void { Index: main/ph-scale/js/common/view/ParticleCountsNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/ph-scale/js/common/view/ParticleCountsNode.ts b/main/ph-scale/js/common/view/ParticleCountsNode.ts --- a/main/ph-scale/js/common/view/ParticleCountsNode.ts (revision 1e218bb75409935ab858cb74e9c18f6d10ffcc11) +++ b/main/ph-scale/js/common/view/ParticleCountsNode.ts (date 1686800571463) @@ -123,15 +123,15 @@ // Links to the count Properties this.addLinkedElement( derivedProperties.particleCountH3OProperty, { - tandem: options.tandem.createTandem( 'particleCountH3OProperty' ) + tandemName: 'particleCountH3OProperty' } ); this.addLinkedElement( derivedProperties.particleCountOHProperty, { - tandem: options.tandem.createTandem( 'particleCountOHProperty' ) + tandemName: 'particleCountOHProperty' } ); this.addLinkedElement( derivedProperties.particleCountH2OProperty, { - tandem: options.tandem.createTandem( 'particleCountH2OProperty' ) + tandemName: 'particleCountH2OProperty' } ); } } Index: main/acid-base-solutions/js/common/view/ReactionEquationNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/acid-base-solutions/js/common/view/ReactionEquationNode.ts b/main/acid-base-solutions/js/common/view/ReactionEquationNode.ts --- a/main/acid-base-solutions/js/common/view/ReactionEquationNode.ts (revision fd4acdd3bb8819e4fc5269ca43a0c70072aac1bc) +++ b/main/acid-base-solutions/js/common/view/ReactionEquationNode.ts (date 1686799817189) @@ -36,9 +36,7 @@ this.top = beaker.position.y + 10; } ); - this.addLinkedElement( solutionTypeProperty, { - tandem: tandem.createTandem( solutionTypeProperty.tandem.name ) - } ); + this.addLinkedElement( solutionTypeProperty ); } public override dispose(): void { Index: main/acid-base-solutions/js/common/model/PHMeter.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/acid-base-solutions/js/common/model/PHMeter.ts b/main/acid-base-solutions/js/common/model/PHMeter.ts --- a/main/acid-base-solutions/js/common/model/PHMeter.ts (revision fd4acdd3bb8819e4fc5269ca43a0c70072aac1bc) +++ b/main/acid-base-solutions/js/common/model/PHMeter.ts (date 1686799735011) @@ -50,9 +50,7 @@ phetioValueType: BooleanIO } ); - this.addLinkedElement( pHProperty, { - tandem: tandem.createTandem( pHProperty.tandem.name ) - } ); + this.addLinkedElement( pHProperty ); } public override dispose(): void { Index: main/tandem/js/PhetioObject.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/tandem/js/PhetioObject.ts b/main/tandem/js/PhetioObject.ts --- a/main/tandem/js/PhetioObject.ts (revision 84b5d7cf69f194db2c233c13b2789ba4ee4a8a1a) +++ b/main/tandem/js/PhetioObject.ts (date 1686799605421) @@ -861,7 +861,7 @@ return false; }; -type LinkedElementOptions = PhetioObjectOptions; +type LinkedElementOptions = StrictOmit & { tandemName?: string }; /** * Internal class to avoid cyclic dependencies. Index: main/acid-base-solutions/js/common/model/PHPaper.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/acid-base-solutions/js/common/model/PHPaper.ts b/main/acid-base-solutions/js/common/model/PHPaper.ts --- a/main/acid-base-solutions/js/common/model/PHPaper.ts (revision fd4acdd3bb8819e4fc5269ca43a0c70072aac1bc) +++ b/main/acid-base-solutions/js/common/model/PHPaper.ts (date 1686799735016) @@ -69,9 +69,7 @@ this.positionProperty.link( () => this.updateIndicatorHeight() ); - this.addLinkedElement( pHProperty, { - tandem: tandem.createTandem( pHProperty.tandem.name ) - } ); + this.addLinkedElement( pHProperty ); } public override dispose(): void { Index: main/geometric-optics/js/common/model/GOScene.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/common/model/GOScene.ts b/main/geometric-optics/js/common/model/GOScene.ts --- a/main/geometric-optics/js/common/model/GOScene.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/common/model/GOScene.ts (date 1686800153400) @@ -55,9 +55,7 @@ this.optic = optic; - this.addLinkedElement( optic, { - tandem: options.tandem.createTandem( optic.tandem.name ) - } ); + this.addLinkedElement( optic ); this.raysAnimationTimeProperty = new NumberProperty( 0, { units: 's', Index: main/acid-base-solutions/js/common/model/MagnifyingGlass.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/acid-base-solutions/js/common/model/MagnifyingGlass.ts b/main/acid-base-solutions/js/common/model/MagnifyingGlass.ts --- a/main/acid-base-solutions/js/common/model/MagnifyingGlass.ts (revision fd4acdd3bb8819e4fc5269ca43a0c70072aac1bc) +++ b/main/acid-base-solutions/js/common/model/MagnifyingGlass.ts (date 1686799735002) @@ -39,9 +39,7 @@ this.radius = 0.465 * beaker.size.height; this.position = beaker.position.plusXY( 0, -beaker.size.height / 2 ); - this.addLinkedElement( solutionTypeProperty, { - tandem: tandem.createTandem( solutionTypeProperty.tandem.name ) - } ); + this.addLinkedElement( solutionTypeProperty ); } public override dispose(): void { Index: main/states-of-matter/js/atomic-interactions/view/HandNode.js IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/states-of-matter/js/atomic-interactions/view/HandNode.js b/main/states-of-matter/js/atomic-interactions/view/HandNode.js --- a/main/states-of-matter/js/atomic-interactions/view/HandNode.js (revision 3b18e5dd899bd01c7b0302d7b262129a7ba948d1) +++ b/main/states-of-matter/js/atomic-interactions/view/HandNode.js (date 1686800784900) @@ -98,7 +98,7 @@ // add a linked element in phet-io to the property that controls this node's visibility this.addLinkedElement( dualAtomModel.movementHintVisibleProperty, { - tandem: options.tandem.createTandem( 'movementHintVisibleProperty' ) + tandemName: 'movementHintVisibleProperty' } ); // dispose function Index: main/acid-base-solutions/js/common/model/ConductivityTester.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/acid-base-solutions/js/common/model/ConductivityTester.ts b/main/acid-base-solutions/js/common/model/ConductivityTester.ts --- a/main/acid-base-solutions/js/common/model/ConductivityTester.ts (revision fd4acdd3bb8819e4fc5269ca43a0c70072aac1bc) +++ b/main/acid-base-solutions/js/common/model/ConductivityTester.ts (date 1686799735008) @@ -86,9 +86,7 @@ phetioValueType: NumberIO } ); - this.addLinkedElement( pHProperty, { - tandem: tandem.createTandem( pHProperty.tandem.name ) - } ); + this.addLinkedElement( pHProperty ); } public override dispose(): void { Index: main/ph-scale/js/common/view/graph/GraphNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/ph-scale/js/common/view/graph/GraphNode.ts b/main/ph-scale/js/common/view/graph/GraphNode.ts --- a/main/ph-scale/js/common/view/graph/GraphNode.ts (revision 1e218bb75409935ab858cb74e9c18f6d10ffcc11) +++ b/main/ph-scale/js/common/view/graph/GraphNode.ts (date 1686800571460) @@ -174,24 +174,24 @@ // Link to concentration Properties, see https://github.com/phetsims/ph-scale/issues/125 this.addLinkedElement( derivedProperties.concentrationH2OProperty, { - tandem: options.tandem.createTandem( 'concentrationH2OProperty' ) + tandemName: 'concentrationH2OProperty' } ); this.addLinkedElement( derivedProperties.concentrationH3OProperty, { - tandem: options.tandem.createTandem( 'concentrationH3OProperty' ) + tandemName: 'concentrationH3OProperty' } ); this.addLinkedElement( derivedProperties.concentrationOHProperty, { - tandem: options.tandem.createTandem( 'concentrationOHProperty' ) + tandemName: 'concentrationOHProperty' } ); // Link to quantity Properties, see https://github.com/phetsims/ph-scale/issues/125 this.addLinkedElement( derivedProperties.quantityH2OProperty, { - tandem: options.tandem.createTandem( 'quantityH2OProperty' ) + tandemName: 'quantityH2OProperty' } ); this.addLinkedElement( derivedProperties.quantityH3OProperty, { - tandem: options.tandem.createTandem( 'quantityH3OProperty' ) + tandemName: 'quantityH3OProperty' } ); this.addLinkedElement( derivedProperties.quantityOHProperty, { - tandem: options.tandem.createTandem( 'quantityOHProperty' ) + tandemName: 'quantityOHProperty' } ); // keyboard traversal order, see https://github.com/phetsims/ph-scale/issues/249 Index: main/beers-law-lab/js/common/view/ConcentrationMeterUnitsControl.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/common/view/ConcentrationMeterUnitsControl.ts b/main/beers-law-lab/js/common/view/ConcentrationMeterUnitsControl.ts --- a/main/beers-law-lab/js/common/view/ConcentrationMeterUnitsControl.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/common/view/ConcentrationMeterUnitsControl.ts (date 1686799992100) @@ -47,9 +47,7 @@ super( options ); - this.addLinkedElement( beakerUnitsProperty, { - tandem: options.tandem.createTandem( beakerUnitsProperty.tandem.name ) - } ); + this.addLinkedElement( beakerUnitsProperty ); this.disposeConcentrationMeterUnitsControl = (): void => { labelText.dispose(); Index: main/beers-law-lab/js/common/view/BeakerUnitsControl.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/common/view/BeakerUnitsControl.ts b/main/beers-law-lab/js/common/view/BeakerUnitsControl.ts --- a/main/beers-law-lab/js/common/view/BeakerUnitsControl.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/common/view/BeakerUnitsControl.ts (date 1686799992101) @@ -47,9 +47,7 @@ super( options ); - this.addLinkedElement( beakerUnitsProperty, { - tandem: options.tandem.createTandem( beakerUnitsProperty.tandem.name ) - } ); + this.addLinkedElement( beakerUnitsProperty ); this.disposeBeakerUnitsControl = (): void => { labelText.dispose(); Index: main/ph-scale/js/common/model/Solute.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/ph-scale/js/common/model/Solute.ts b/main/ph-scale/js/common/model/Solute.ts --- a/main/ph-scale/js/common/model/Solute.ts (revision 1e218bb75409935ab858cb74e9c18f6d10ffcc11) +++ b/main/ph-scale/js/common/model/Solute.ts (date 1686800571439) @@ -103,7 +103,7 @@ this.colorStopRatio = options.colorStopRatio; this.addLinkedElement( nameProperty, { - tandem: options.tandem.createTandem( 'nameProperty' ) + tandemName: 'nameProperty' } ); } Index: main/beers-law-lab/js/common/model/Solute.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/common/model/Solute.ts b/main/beers-law-lab/js/common/model/Solute.ts --- a/main/beers-law-lab/js/common/model/Solute.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/common/model/Solute.ts (date 1686799992091) @@ -116,7 +116,7 @@ this.strokeStyle = options.particleColor.darkerColor().getCanvasStyle(); this.addLinkedElement( options.nameProperty, { - tandem: options.tandem.createTandem( 'nameProperty' ) + tandemName: 'nameProperty' } ); } Index: main/ph-scale/js/common/model/Solution.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/ph-scale/js/common/model/Solution.ts b/main/ph-scale/js/common/model/Solution.ts --- a/main/ph-scale/js/common/model/Solution.ts (revision 1e218bb75409935ab858cb74e9c18f6d10ffcc11) +++ b/main/ph-scale/js/common/model/Solution.ts (date 1686800571456) @@ -76,7 +76,7 @@ // Create a PhET-iO linked element that points to where soluteProperty lives (in Dropper). // This makes it easier to find soluteProperty in the Studio tree. this.addLinkedElement( this.soluteProperty, { - tandem: options.tandem.createTandem( 'soluteProperty' ) + tandemName: 'soluteProperty' } ); this.maxVolume = options.maxVolume; Index: main/calculus-grapher/js/common/view/LabeledPointsNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/calculus-grapher/js/common/view/LabeledPointsNode.ts b/main/calculus-grapher/js/common/view/LabeledPointsNode.ts --- a/main/calculus-grapher/js/common/view/LabeledPointsNode.ts (revision 08db488e9603c74044e30ddf61e3aee9c0c80df6) +++ b/main/calculus-grapher/js/common/view/LabeledPointsNode.ts (date 1686800465001) @@ -43,7 +43,7 @@ // Link to model.tools.labeledPoints this.addLinkedElement( linkableElement, { - tandem: tandem.createTandem( 'labeledPoints' ) + tandemName: 'labeledPoints' } ); } } Index: main/circuit-construction-kit-common/js/view/AmmeterNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/circuit-construction-kit-common/js/view/AmmeterNode.ts b/main/circuit-construction-kit-common/js/view/AmmeterNode.ts --- a/main/circuit-construction-kit-common/js/view/AmmeterNode.ts (revision ac7789949cfe94d5b254c8961e69d501837ab3b7) +++ b/main/circuit-construction-kit-common/js/view/AmmeterNode.ts (date 1686800464960) @@ -257,7 +257,7 @@ } this.addLinkedElement( ammeter, { - tandem: tandemForChildren.createTandem( 'ammeter' ) + tandemName: 'ammeter' } ); } Index: main/gravity-and-orbits/js/common/view/GravityControl.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/gravity-and-orbits/js/common/view/GravityControl.ts b/main/gravity-and-orbits/js/common/view/GravityControl.ts --- a/main/gravity-and-orbits/js/common/view/GravityControl.ts (revision 7317b05b567eebe43ab390618b4ef6da7731fd9d) +++ b/main/gravity-and-orbits/js/common/view/GravityControl.ts (date 1686800464901) @@ -43,7 +43,7 @@ const offTextNode = new Text( GravityAndOrbitsStrings.offStringProperty, TEXT_OPTIONS ); this.addLinkedElement( gravityEnabledProperty, { - tandem: options.tandem.createTandem( 'gravityEnabledProperty' ) + tandemName: 'gravityEnabledProperty' } ); this.addChild( new HBox( { Index: main/calculus-grapher/js/common/view/ScrubberNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/calculus-grapher/js/common/view/ScrubberNode.ts b/main/calculus-grapher/js/common/view/ScrubberNode.ts --- a/main/calculus-grapher/js/common/view/ScrubberNode.ts (revision 08db488e9603c74044e30ddf61e3aee9c0c80df6) +++ b/main/calculus-grapher/js/common/view/ScrubberNode.ts (date 1686800153430) @@ -91,9 +91,7 @@ handleNode.centerY = line.bottom; } ); - this.addLinkedElement( scrubber, { - tandem: options.tandem.createTandem( scrubber.tandem.name ) - } ); + this.addLinkedElement( scrubber ); } /** Index: main/beers-law-lab/js/beerslaw/view/ATDetectorNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/beerslaw/view/ATDetectorNode.ts b/main/beers-law-lab/js/beerslaw/view/ATDetectorNode.ts --- a/main/beers-law-lab/js/beerslaw/view/ATDetectorNode.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/beerslaw/view/ATDetectorNode.ts (date 1686799992092) @@ -78,7 +78,7 @@ this.children = [ wireNode, bodyNode, probeNode ]; this.addLinkedElement( detector, { - tandem: options.tandem.createTandem( 'detector' ) + tandemName: 'detector' } ); } Index: main/calculus-grapher/js/common/view/GraphsNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/calculus-grapher/js/common/view/GraphsNode.ts b/main/calculus-grapher/js/common/view/GraphsNode.ts --- a/main/calculus-grapher/js/common/view/GraphsNode.ts (revision 08db488e9603c74044e30ddf61e3aee9c0c80df6) +++ b/main/calculus-grapher/js/common/view/GraphsNode.ts (date 1686800153438) @@ -164,9 +164,7 @@ this.mutate( options ); - this.addLinkedElement( model.graphSetProperty, { - tandem: options.tandem.createTandem( model.graphSetProperty.tandem.name ) - } ); + this.addLinkedElement( model.graphSetProperty ); } public reset(): void { @@ -285,9 +283,7 @@ graphNode: GraphNode, curvePointProperty: TReadOnlyProperty, fill: TColor, tandemName: string ): void { const plottedPoint = graphNode.addPlottedPoint( curvePointProperty, fill, visibleProperty, tandemName ); - plottedPoint.addLinkedElement( ancillaryTool, { - tandem: plottedPoint.tandem.createTandem( ancillaryTool.tandem.name ) - } ); + plottedPoint.addLinkedElement( ancillaryTool ); } } Index: main/beers-law-lab/js/beerslaw/view/CuvetteNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/beerslaw/view/CuvetteNode.ts b/main/beers-law-lab/js/beerslaw/view/CuvetteNode.ts --- a/main/beers-law-lab/js/beerslaw/view/CuvetteNode.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/beerslaw/view/CuvetteNode.ts (date 1686799992096) @@ -125,9 +125,7 @@ this.x = position.x; this.y = position.y; - this.addLinkedElement( cuvette, { - tandem: options.tandem.createTandem( 'cuvette' ) - } ); + this.addLinkedElement( cuvette ); } } Index: main/circuit-construction-kit-common/js/view/CircuitElementNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/circuit-construction-kit-common/js/view/CircuitElementNode.ts b/main/circuit-construction-kit-common/js/view/CircuitElementNode.ts --- a/main/circuit-construction-kit-common/js/view/CircuitElementNode.ts (revision ac7789949cfe94d5b254c8961e69d501837ab3b7) +++ b/main/circuit-construction-kit-common/js/view/CircuitElementNode.ts (date 1686800464891) @@ -66,7 +66,7 @@ // Make it easy to get back to circuitElements this.addLinkedElement( circuitElement, { - tandem: providedOptions.tandem!.createTandem( 'circuitElement' ) + tandemName: 'circuitElement' } ); this.updateOpacityOnInteractiveChange(); Index: main/calculus-grapher/js/common/view/CurveNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/calculus-grapher/js/common/view/CurveNode.ts b/main/calculus-grapher/js/common/view/CurveNode.ts --- a/main/calculus-grapher/js/common/view/CurveNode.ts (revision 08db488e9603c74044e30ddf61e3aee9c0c80df6) +++ b/main/calculus-grapher/js/common/view/CurveNode.ts (date 1686800464997) @@ -160,7 +160,7 @@ const strokeProperty = options.stroke; if ( strokeProperty instanceof ProfileColorProperty ) { this.addLinkedElement( strokeProperty, { - tandem: options.tandem.createTandem( 'stroke' ) + tandemName: 'stroke' } ); } } Index: main/beers-law-lab/js/beerslaw/view/SolutionPanel.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/beerslaw/view/SolutionPanel.ts b/main/beers-law-lab/js/beerslaw/view/SolutionPanel.ts --- a/main/beers-law-lab/js/beerslaw/view/SolutionPanel.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/beerslaw/view/SolutionPanel.ts (date 1686799992085) @@ -60,7 +60,7 @@ super( contentNode, options ); this.addLinkedElement( solutionInCuvette, { - tandem: options.tandem.createTandem( 'solutionInCuvette' ) + tandemName: 'solutionInCuvette' } ); } Index: main/beers-law-lab/js/beerslaw/view/WavelengthPanel.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/beerslaw/view/WavelengthPanel.ts b/main/beers-law-lab/js/beerslaw/view/WavelengthPanel.ts --- a/main/beers-law-lab/js/beerslaw/view/WavelengthPanel.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/beerslaw/view/WavelengthPanel.ts (date 1686799992095) @@ -173,9 +173,7 @@ super( content, options ); - this.addLinkedElement( light.wavelengthProperty, { - tandem: options.tandem.createTandem( light.wavelengthProperty.tandem.name ) - } ); + this.addLinkedElement( light.wavelengthProperty ); } public override dispose(): void { Index: main/ph-scale/js/mysolution/view/MySolutionPHAccordionBox.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/ph-scale/js/mysolution/view/MySolutionPHAccordionBox.ts b/main/ph-scale/js/mysolution/view/MySolutionPHAccordionBox.ts --- a/main/ph-scale/js/mysolution/view/MySolutionPHAccordionBox.ts (revision 1e218bb75409935ab858cb74e9c18f6d10ffcc11) +++ b/main/ph-scale/js/mysolution/view/MySolutionPHAccordionBox.ts (date 1686800464884) @@ -33,9 +33,7 @@ super( contentNode, probeYOffset, providedOptions ); - this.addLinkedElement( pHProperty, { - tandem: providedOptions.tandem.createTandem( pHProperty.tandem.name ) - } ); + this.addLinkedElement( pHProperty ); } } Index: main/calculus-grapher/js/common/view/TangentArrowNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/calculus-grapher/js/common/view/TangentArrowNode.ts b/main/calculus-grapher/js/common/view/TangentArrowNode.ts --- a/main/calculus-grapher/js/common/view/TangentArrowNode.ts (revision 08db488e9603c74044e30ddf61e3aee9c0c80df6) +++ b/main/calculus-grapher/js/common/view/TangentArrowNode.ts (date 1686800153395) @@ -90,9 +90,7 @@ [ tangentScrubber.xProperty, tangentScrubber.originalCurvePointProperty, tangentScrubber.derivativeCurvePointProperty ], () => updateArrow() ); - this.addLinkedElement( tangentScrubber, { - tandem: options.tandem.createTandem( tangentScrubber.tandem.name ) - } ); + this.addLinkedElement( tangentScrubber ); } } Index: main/beers-law-lab/js/beerslaw/view/ConcentrationControl.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/beerslaw/view/ConcentrationControl.ts b/main/beers-law-lab/js/beerslaw/view/ConcentrationControl.ts --- a/main/beers-law-lab/js/beerslaw/view/ConcentrationControl.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/beerslaw/view/ConcentrationControl.ts (date 1686799992088) @@ -78,9 +78,7 @@ super( options ); // concentrationProperty is unused in this class, and provided only so that it can be linked for PhET-iO. - this.addLinkedElement( concentrationProperty, { - tandem: options.tandem.createTandem( concentrationProperty.tandem.name ) - } ); + this.addLinkedElement( concentrationProperty ); } public override dispose(): void { @@ -210,9 +208,7 @@ this.solution = solution; - this.addLinkedElement( solution.concentrationProperty, { - tandem: options.tandem.createTandem( solution.concentrationProperty.tandem.name ) - } ); + this.addLinkedElement( solution.concentrationProperty ); } public override dispose(): void { Index: main/beers-law-lab/js/beerslaw/view/LightNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/beerslaw/view/LightNode.ts b/main/beers-law-lab/js/beerslaw/view/LightNode.ts --- a/main/beers-law-lab/js/beerslaw/view/LightNode.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/beerslaw/view/LightNode.ts (date 1686799992083) @@ -37,7 +37,7 @@ super( light.isOnProperty, options ); this.addLinkedElement( light, { - tandem: options.tandem.createTandem( 'light' ) + tandemName: 'light' } ); } Index: main/beers-law-lab/js/beerslaw/view/BLLRulerNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/beerslaw/view/BLLRulerNode.ts b/main/beers-law-lab/js/beerslaw/view/BLLRulerNode.ts --- a/main/beers-law-lab/js/beerslaw/view/BLLRulerNode.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/beerslaw/view/BLLRulerNode.ts (date 1686799992093) @@ -74,7 +74,7 @@ } ) ); this.addLinkedElement( ruler, { - tandem: options.tandem.createTandem( 'ruler' ) + tandemName: 'ruler' } ); } Index: main/geometric-optics/js/mirror/view/MirrorNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/geometric-optics/js/mirror/view/MirrorNode.ts b/main/geometric-optics/js/mirror/view/MirrorNode.ts --- a/main/geometric-optics/js/mirror/view/MirrorNode.ts (revision ef7095054bbed639b95efef7ad8b37b8ca29e247) +++ b/main/geometric-optics/js/mirror/view/MirrorNode.ts (date 1686800464925) @@ -78,9 +78,7 @@ this.translation = modelViewTransform.modelToViewPosition( position ); } ); - this.addLinkedElement( mirror, { - tandem: options.tandem.createTandem( mirror.tandem.name ) - } ); + this.addLinkedElement( mirror ); } public override dispose(): void { Index: main/calculus-grapher/js/common/view/LabeledPointNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/calculus-grapher/js/common/view/LabeledPointNode.ts b/main/calculus-grapher/js/common/view/LabeledPointNode.ts --- a/main/calculus-grapher/js/common/view/LabeledPointNode.ts (revision 08db488e9603c74044e30ddf61e3aee9c0c80df6) +++ b/main/calculus-grapher/js/common/view/LabeledPointNode.ts (date 1686800153417) @@ -94,9 +94,7 @@ super( options ); - this.addLinkedElement( labeledPoint, { - tandem: options.tandem.createTandem( labeledPoint.tandem.name ) - } ); + this.addLinkedElement( labeledPoint ); } } calculusGrapher.register( 'LabeledPointNode', LabeledPointNode ); Index: main/calculus-grapher/js/common/view/LabeledLinesNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/calculus-grapher/js/common/view/LabeledLinesNode.ts b/main/calculus-grapher/js/common/view/LabeledLinesNode.ts --- a/main/calculus-grapher/js/common/view/LabeledLinesNode.ts (revision 08db488e9603c74044e30ddf61e3aee9c0c80df6) +++ b/main/calculus-grapher/js/common/view/LabeledLinesNode.ts (date 1686800464897) @@ -51,7 +51,7 @@ // Link to model.tools.labeledLines this.addLinkedElement( labeledLinesLinkableElement, { - tandem: options.tandem.createTandem( 'labeledLines' ) + tandemName: 'labeledLines' } ); } } Index: main/beers-law-lab/js/beerslaw/model/SolutionInCuvette.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/beerslaw/model/SolutionInCuvette.ts b/main/beers-law-lab/js/beerslaw/model/SolutionInCuvette.ts --- a/main/beers-law-lab/js/beerslaw/model/SolutionInCuvette.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/beerslaw/model/SolutionInCuvette.ts (date 1686799992089) @@ -94,9 +94,7 @@ phetioDocumentation: 'Transmittance of the solution in the cuvette' } ); - this.addLinkedElement( solutionProperty, { - tandem: tandem.createTandem( solutionProperty.tandem.name ) - } ); + this.addLinkedElement( solutionProperty ); } public override dispose(): void { Index: main/beers-law-lab/js/beerslaw/model/BeersLawSolution.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/beerslaw/model/BeersLawSolution.ts b/main/beers-law-lab/js/beerslaw/model/BeersLawSolution.ts --- a/main/beers-law-lab/js/beerslaw/model/BeersLawSolution.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/beerslaw/model/BeersLawSolution.ts (date 1686799817187) @@ -118,11 +118,11 @@ this.tandemName = options.tandem.name; this.addLinkedElement( options.nameProperty, { - tandem: options.tandem.createTandem( 'nameProperty' ) + tandemName: 'nameProperty' } ); this.addLinkedElement( options.formulaProperty, { - tandem: options.tandem.createTandem( 'formulaProperty' ) + tandemName: 'formulaProperty' } ); } Index: main/circuit-construction-kit-common/js/view/VertexNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/circuit-construction-kit-common/js/view/VertexNode.ts b/main/circuit-construction-kit-common/js/view/VertexNode.ts --- a/main/circuit-construction-kit-common/js/view/VertexNode.ts (revision ac7789949cfe94d5b254c8961e69d501837ab3b7) +++ b/main/circuit-construction-kit-common/js/view/VertexNode.ts (date 1686800464910) @@ -91,7 +91,7 @@ this.circuitNode = circuitNode; this.addLinkedElement( vertex, { - tandem: tandem.createTandem( 'vertex' ) + tandemName: 'vertex' } ); // Use a query parameter to turn on node voltage readouts for debugging only. Index: main/center-and-variability/js/median/view/CardNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/center-and-variability/js/median/view/CardNode.ts b/main/center-and-variability/js/median/view/CardNode.ts --- a/main/center-and-variability/js/median/view/CardNode.ts (revision f2941dc88774d5274cb83bc9ef8722dae0748184) +++ b/main/center-and-variability/js/median/view/CardNode.ts (date 1686799343717) @@ -126,9 +126,7 @@ this.soccerBall.dragStartedEmitter.addListener( () => this.moveToFront() ); - this.addLinkedElement( cardModel, { - tandem: options.tandem.createTandem( 'cardModel' ) - } ); + this.addLinkedElement( cardModel ); } public animateTo( destination: Vector2, duration: number, audio: boolean ): void { Index: main/center-and-variability/js/soccer-common/view/SoccerBallNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/center-and-variability/js/soccer-common/view/SoccerBallNode.ts b/main/center-and-variability/js/soccer-common/view/SoccerBallNode.ts --- a/main/center-and-variability/js/soccer-common/view/SoccerBallNode.ts (revision f2941dc88774d5274cb83bc9ef8722dae0748184) +++ b/main/center-and-variability/js/soccer-common/view/SoccerBallNode.ts (date 1686799735019) @@ -168,9 +168,7 @@ this.touchArea = Shape.rectangle( 0, 0, 0, 0 ); } ); - this.addLinkedElement( soccerBall, { - tandem: options.tandem.createTandem( 'soccerBall' ) - } ); + this.addLinkedElement( soccerBall ); // Not focusable until the ball has been kicked into the play area this.focusable = false; Index: main/calculus-grapher/js/common/view/AreaUnderCurvePlot.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/calculus-grapher/js/common/view/AreaUnderCurvePlot.ts b/main/calculus-grapher/js/common/view/AreaUnderCurvePlot.ts --- a/main/calculus-grapher/js/common/view/AreaUnderCurvePlot.ts (revision 08db488e9603c74044e30ddf61e3aee9c0c80df6) +++ b/main/calculus-grapher/js/common/view/AreaUnderCurvePlot.ts (date 1686800153427) @@ -93,9 +93,7 @@ visible && updateDataSets(); } ); - this.addLinkedElement( areaUnderCurveScrubber, { - tandem: options.tandem.createTandem( areaUnderCurveScrubber.tandem.name ) - } ); + this.addLinkedElement( areaUnderCurveScrubber ); } } Index: main/beers-law-lab/js/concentration/view/BLLDropperNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/main/beers-law-lab/js/concentration/view/BLLDropperNode.ts b/main/beers-law-lab/js/concentration/view/BLLDropperNode.ts --- a/main/beers-law-lab/js/concentration/view/BLLDropperNode.ts (revision ba35eb35c66269c9ed712c54afa23573b9da8b9d) +++ b/main/beers-law-lab/js/concentration/view/BLLDropperNode.ts (date 1686799992099) @@ -90,9 +90,7 @@ // dilate touch area this.touchArea = this.localBounds.dilatedX( 0.25 * this.width ); - this.addLinkedElement( dropper, { - tandem: options.tandem.createTandem( dropper.tandem.name ) - } ); + this.addLinkedElement( dropper ); } public override dispose(): void { ```

The 2 holdouts on this pattern are:


../../../axon/js/DerivedProperty.ts:129:13 - error TS2345: Argument of type '{ tandem: Tandem; }' is not assignable to parameter of type 'LinkedElementOptions'.
  Object literal may only specify known properties, and 'tandem' does not exist in type 'LinkedElementOptions'.

129             tandem: dependenciesTandem.createTandemFromPhetioID( dependency.tandem.phetioID )
                ~~~~~~

../../../joist/js/preferences/PreferencesModel.ts:451:62 - error TS2345: Argument of type '{ tandem: Tandem; }' is not assignable to parameter of type 'LinkedElementOptions'.
  Object literal may only specify known properties, and 'tandem' does not exist in type 'LinkedElementOptions'.

451       this.addLinkedElement( modelPropertyObject.property, { tandem: tandem.createTandem( tandemName ) } );
                                                                 ~~~~~~

Found 2 errors in 2 files.

Errors  Files
     1  ../../../axon/js/DerivedProperty.ts:129
     1  ../../../joist/js/preferences/PreferencesModel.ts:451

I think we should figure out a way to make this work.

Heads up to @pixelzoom @jbphet @zepumph that I'm hoping to commit numerous cross-repo changes for this issue soon.

zepumph commented 1 year ago

@samreid, I'm confused by the current state of this issue. In a conversation with you, I thought we discussed that these two "holdouts" were reasonable usages, and that it is acceptable to allow tandem as an option for edge cases. What do you recommend is next for this change?

zepumph commented 1 year ago

@samreid and I cleared it up. Thanks!

zepumph commented 1 year ago

One more TODO here.