Closed pixelzoom closed 3 years ago
If for some reason we need to support hiding the environmentNode and everything that's on top of it (clock, radio buttons, push buttons) then we will need to add an additional parent element for all of those things, environmentPanel
.
Studio tree is currently:
It would change to:
view
visibleProperty
+addMutationsPanel
+dialogs
+environmentalFactorsPanel
+environmentPanel
+environmentNode
+environmentRadioButtonGroup
+generationClock
+playButtonGroup
+genes
+graphs
+resetAllButton
+timeControlNode
environmentPanel.visibleProperty
would be writeable.
environmentNode.visibleProperty
would be changed to read-only
Yikes! I don't know how we didn't notice this before when we reviewed studio. Let's definitely make this read-only. I can't think of a reason to want to set environmentNode.visibleProperty
to false.
@amanda-phet what do you think about the restructuring of the Studio tree that I proposed in https://github.com/phetsims/natural-selection/issues/263#issuecomment-802978938? Of is just making environmentNode.visibleProperty
read-only sufficient?
I prefer to not restructure the tree that way. I also think it would be incredibly strange for someone to want to hide the entire environment (or environmentPanel
) in this sim. Without it, the sim is not very useful.
OK, no environmentPanel
, and n changes to the tree structure.
I have made environmentNode.visibleProperty
read-only. @amanda-phet please review in master, then please close.
Re the tree structure... @amanda-phet and I discussed this more on Slack. We discussed how this part of the UI might be interpretted by the instructional designer:
Is it a panel with the clock, radio buttons, and push buttons on top of it? (siblings in the tree, the current implementation) Or is it a panel, with the clock, radio buttons, and push buttons inside of it? (children of the panel in the tree) We decided that the latter made more sense, and that's the structural change that I describe in https://github.com/phetsims/natural-selection/issues/263#issuecomment-802978938.
This is a relatively easy change, and is nice structural improvement, so I will make it so. And environmentPanel.visibleProperty
will be read-only.
@amanda-phet ready for review. The revised tree structure is shown below. And these 2 elements are now read-only:
environmentPanel.visibleProperty
environmentPanel.environmentNode.visibleProperty
Looks great! Glad we made the change.
I noticed that
*.environmentNode.visibleProperty
is not currently read-only. When it's set to false, it looks odd, see screenshot below. Should it be read-only?