From d08e0cda2dcab01da81a5853ffa4846a861b88e7 Mon Sep 17 00:00:00 2001 From: pixelzoom Date: Fri, 28 Jul 2023 14:56:52 -0600 Subject: [PATCH] phetioFeatured change requests, https://github.com/phetsims/natural-selection/issues/345 --- js/common/model/DataProbe.ts | 3 ++- js/common/model/GenerationClock.ts | 3 ++- js/common/model/PopulationModel.ts | 6 ++++-- js/common/model/ProportionsModel.ts | 3 ++- js/common/view/AddMutationsPanel.ts | 8 +++++--- js/common/view/pedigree/PedigreeGraphNode.ts | 3 ++- js/common/view/population/DataProbeNode.ts | 3 ++- .../view/population/PopulationGenerationScroller.ts | 10 ++++++++-- js/common/view/population/PopulationGraphNode.ts | 5 ++++- 9 files changed, 31 insertions(+), 13 deletions(-) diff --git a/js/common/model/DataProbe.ts b/js/common/model/DataProbe.ts index 74aaba5a..7348e624 100644 --- a/js/common/model/DataProbe.ts +++ b/js/common/model/DataProbe.ts @@ -51,7 +51,8 @@ export default class DataProbe extends PhetioObject { // PhetioObjectOptions isDisposable: false, - phetioState: false // to prevent serialization, because we don't have an IO Type + phetioState: false, // to prevent serialization, because we don't have an IO Type + phetioFeatured: true }, providedOptions ); super( options ); diff --git a/js/common/model/GenerationClock.ts b/js/common/model/GenerationClock.ts index 1c4e6765..55129d1b 100644 --- a/js/common/model/GenerationClock.ts +++ b/js/common/model/GenerationClock.ts @@ -47,7 +47,8 @@ export default class GenerationClock extends PhetioObject { // PhetioObjectOptions isDisposable: false, phetioState: false, // to prevent serialization, because we don't have an IO Type - phetioDocumentation: 'the clock that marks the duration of a generation' + phetioDocumentation: 'the clock that marks the duration of a generation', + phetioFeatured: true }, providedOptions ); super( options ); diff --git a/js/common/model/PopulationModel.ts b/js/common/model/PopulationModel.ts index d31b267d..38529bd3 100644 --- a/js/common/model/PopulationModel.ts +++ b/js/common/model/PopulationModel.ts @@ -100,7 +100,8 @@ export default class PopulationModel extends PhetioObject { // PhetioObjectOptions isDisposable: false, phetioState: false, // to prevent serialization, because we don't have an IO Type - phetioDocumentation: 'model elements that are specific to the Population feature' + phetioDocumentation: 'model elements that are specific to the Population feature', + phetioFeatured: true }, providedOptions ); super( options ); @@ -201,7 +202,8 @@ export default class PopulationModel extends PhetioObject { numberType: 'Integer', range: new Range( 0, Y_MAXIMUMS.length - 1 ), tandem: options.tandem.createTandem( 'yZoomLevelProperty' ), - phetioDocumentation: 'Zooms in and out by selecting a pre-set y-axis range. The smaller the value, the larger the y-axis range.' + phetioDocumentation: 'Zooms in and out by selecting a pre-set y-axis range. The smaller the value, the larger the y-axis range.', + phetioFeatured: true } ); this.yRangeProperty = new DerivedProperty( diff --git a/js/common/model/ProportionsModel.ts b/js/common/model/ProportionsModel.ts index 266e8757..eb7d69f1 100644 --- a/js/common/model/ProportionsModel.ts +++ b/js/common/model/ProportionsModel.ts @@ -74,7 +74,8 @@ export default class ProportionsModel extends PhetioObject { // PhetioObjectOptions isDisposable: false, phetioState: false, // to prevent serialization, because we don't have an IO Type - phetioDocumentation: 'model elements that are specific to the Proportions feature' + phetioDocumentation: 'model elements that are specific to the Proportions feature', + phetioFeatured: true }, providedOptions ); super( options ); diff --git a/js/common/view/AddMutationsPanel.ts b/js/common/view/AddMutationsPanel.ts index 0a93c403..efefc638 100644 --- a/js/common/view/AddMutationsPanel.ts +++ b/js/common/view/AddMutationsPanel.ts @@ -9,7 +9,7 @@ */ import DerivedProperty from '../../../../axon/js/DerivedProperty.js'; -import optionize, { combineOptions, EmptySelfOptions, optionize3 } from '../../../../phet-core/js/optionize.js'; +import optionize, { combineOptions, EmptySelfOptions, optionize4 } from '../../../../phet-core/js/optionize.js'; import StrictOmit from '../../../../phet-core/js/types/StrictOmit.js'; import PickRequired from '../../../../phet-core/js/types/PickRequired.js'; import { AlignBox, AlignBoxOptions, AlignGroup, HBox, HBoxOptions, Image, Node, NodeOptions, Rectangle, TColor, Text, VBox, VBoxOptions } from '../../../../scenery/js/imports.js'; @@ -43,8 +43,10 @@ export default class AddMutationsPanel extends NaturalSelectionPanel { public constructor( genePool: GenePool, providedOptions: AddMutationsPanelOptions ) { - const options = optionize3>()( - {}, NaturalSelectionConstants.PANEL_OPTIONS, providedOptions ); + const options = optionize4>()( + {}, NaturalSelectionConstants.PANEL_OPTIONS, { + visiblePropertyOptions: { phetioFeatured: true } + }, providedOptions ); // All allele icons have the same effective width and height. const iconsAlignGroup = new AlignGroup(); diff --git a/js/common/view/pedigree/PedigreeGraphNode.ts b/js/common/view/pedigree/PedigreeGraphNode.ts index 5c00dde0..4a7a2f5a 100644 --- a/js/common/view/pedigree/PedigreeGraphNode.ts +++ b/js/common/view/pedigree/PedigreeGraphNode.ts @@ -46,7 +46,8 @@ export default class PedigreeGraphNode extends Node { // NodeOptions phetioVisiblePropertyInstrumented: false, - isDisposable: false + isDisposable: false, + phetioFeatured: true }, providedOptions ); const backgroundNode = new Rectangle( 0, 0, options.graphWidth, options.graphHeight, { diff --git a/js/common/view/population/DataProbeNode.ts b/js/common/view/population/DataProbeNode.ts index 9312c274..2724ac51 100644 --- a/js/common/view/population/DataProbeNode.ts +++ b/js/common/view/population/DataProbeNode.ts @@ -71,7 +71,8 @@ export default class DataProbeNode extends Node { // NodeOptions cursor: 'ew-resize', // east-west arrows, <-> - isDisposable: false + isDisposable: false, + phetioFeatured: true }, providedOptions ); const dataProbe = populationModel.dataProbe; diff --git a/js/common/view/population/PopulationGenerationScroller.ts b/js/common/view/population/PopulationGenerationScroller.ts index f4f71f4f..aa7bdd06 100644 --- a/js/common/view/population/PopulationGenerationScroller.ts +++ b/js/common/view/population/PopulationGenerationScroller.ts @@ -72,7 +72,10 @@ export default class PopulationGenerationScroller extends HBox { const backButton = new ArrowButton( 'left', back, combineOptions( { tandem: options.tandem.createTandem( 'backButton' ), - enabledPropertyOptions: { phetioReadOnly: true } + enabledPropertyOptions: { + phetioReadOnly: true, // see https://github.com/phetsims/natural-selection/issues/344 + phetioFeatured: false // see https://github.com/phetsims/natural-selection/issues/345 + } }, NaturalSelectionConstants.ARROW_BUTTON_OPTIONS ) ); @@ -85,7 +88,10 @@ export default class PopulationGenerationScroller extends HBox { const forwardButton = new ArrowButton( 'right', forward, combineOptions( { tandem: options.tandem.createTandem( 'forwardButton' ), - enabledPropertyOptions: { phetioReadOnly: true } + enabledPropertyOptions: { + phetioReadOnly: true, // see https://github.com/phetsims/natural-selection/issues/344 + phetioFeatured: false // see https://github.com/phetsims/natural-selection/issues/345 + } }, NaturalSelectionConstants.ARROW_BUTTON_OPTIONS ) ); diff --git a/js/common/view/population/PopulationGraphNode.ts b/js/common/view/population/PopulationGraphNode.ts index 034a95e2..f313316b 100644 --- a/js/common/view/population/PopulationGraphNode.ts +++ b/js/common/view/population/PopulationGraphNode.ts @@ -77,7 +77,10 @@ export default class PopulationGraphNode extends Node { touchAreaYDilation: 4, left: boundsRectangle.left, top: boundsRectangle.top, - tandem: options.tandem.createTandem( 'yZoomButtonGroup' ) + tandem: options.tandem.createTandem( 'yZoomButtonGroup' ), + visiblePropertyOptions: { + phetioFeatured: true + } } ); // Dimensions of the 2D grid (sans tick marks) in view coordinates