From 5168e566775261bb28923a4163e685c52615446c Mon Sep 17 00:00:00 2001 From: AgustinVallejo Date: Mon, 22 Jul 2024 16:55:36 -0500 Subject: [PATCH] Removing supportHiddenMaterial option, see https://github.com/phetsims/density-buoyancy-common/issues/256 --- .../view/BuoyancyBasicsExploreScreenView.ts | 1 - js/buoyancy/view/BuoyancyExploreScreenView.ts | 1 - js/buoyancy/view/BuoyancyLabScreenView.ts | 1 - .../view/applications/BuoyancyApplicationsScreenView.ts | 4 +--- js/common/view/MaterialControlNode.ts | 9 --------- 5 files changed, 1 insertion(+), 15 deletions(-) diff --git a/js/buoyancy-basics/view/BuoyancyBasicsExploreScreenView.ts b/js/buoyancy-basics/view/BuoyancyBasicsExploreScreenView.ts index 13388b49..5c4f04c6 100644 --- a/js/buoyancy-basics/view/BuoyancyBasicsExploreScreenView.ts +++ b/js/buoyancy-basics/view/BuoyancyBasicsExploreScreenView.ts @@ -77,7 +77,6 @@ export default class BuoyancyBasicsExploreScreenView extends BuoyancyScreenView< tandem: tandem, minCustomMass: 0.1, maxCustomMass: 15, - supportHiddenMaterial: true, mysteryMaterials: [] } ); diff --git a/js/buoyancy/view/BuoyancyExploreScreenView.ts b/js/buoyancy/view/BuoyancyExploreScreenView.ts index 38e424e5..19dcee8c 100644 --- a/js/buoyancy/view/BuoyancyExploreScreenView.ts +++ b/js/buoyancy/view/BuoyancyExploreScreenView.ts @@ -86,7 +86,6 @@ export default class BuoyancyExploreScreenView extends BuoyancyScreenView model.block.updateSize( Cube.boundsFromVolume( cubicMeters ) ), this.popupLayer, true, { tandem: tandem.createTandem( 'blockControls' ), - highDensityMaxMass: 215, - supportHiddenMaterial: true + highDensityMaxMass: 215 } ); model.block.materialProperty.link( material => { diff --git a/js/common/view/MaterialControlNode.ts b/js/common/view/MaterialControlNode.ts index a5c50177..b7e4ab80 100644 --- a/js/common/view/MaterialControlNode.ts +++ b/js/common/view/MaterialControlNode.ts @@ -27,10 +27,6 @@ type SelfMaterialControlNodeOptions = { // A label, if provided to be placed to the right of the ComboBox labelNode?: Node | null; - // If a hidden material (Mystery materials for example) should be added to the ComboBox - // TODO AV: why can't this just be derived from if you pass in mystery material in the parameter? https://github.com/phetsims/density-buoyancy-common/issues/256 - supportHiddenMaterial?: boolean; - minCustomMass?: number; maxCustomMass?: number; minCustomVolumeLiters?: number; @@ -51,7 +47,6 @@ export default class MaterialControlNode extends VBox { const options = optionize()( { syncCustomMaterialDensity: true, labelNode: null, - supportHiddenMaterial: false, minCustomMass: 0.5, maxCustomMass: 10, minCustomVolumeLiters: 1, @@ -63,10 +58,6 @@ export default class MaterialControlNode extends VBox { align: 'left' } ); - if ( !options.supportHiddenMaterial ) { - materials = materials.filter( material => !material.hidden ); - } - const comboMaxWidth = 110; // TODO AV: sort at usage sites instead? https://github.com/phetsims/density-buoyancy-common/issues/256