You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WaterLevelTriangleNode is effectively a slider (with a custom thumb and invisible track). But it currently extends Node, and it's name does not identify it as a slider. Using composition instead of inheritance here is not advantageous, and has disadvantages:
(1) It's a slider, and calling it something else is confusing.
(2) PhET-iO (and Studio) wants it to look like a slider. You're having to make it look like a slider in the tandem hierarchy by defining const sliderTandem, and you won't need to do that if it extends VSlider.
(3) For a11y, it should be a slider. This will become more important as other a11y features are added.
(4) If it extends VSlider, you won't need to override dispose.
So I recommend:
rename WaterLevelTriangleNode to WaterLevelSlider
reimplement so that WaterLevelTriangleNode extends VSlider
rename this.waterLevelTriangle to this.waterLevelSlider in WaterCup3DNode.ts, and change its tandem name to match
The text was updated successfully, but these errors were encountered:
Nothing about the name of PredictMeanNode tells me that it's a line or a slider. Suggested to rename to PredictMeanLine, and document that it behaves like a slider for a11y purposes.
For code review #41 ...
WaterLevelTriangleNode is effectively a slider (with a custom thumb and invisible track). But it currently extends Node, and it's name does not identify it as a slider. Using composition instead of inheritance here is not advantageous, and has disadvantages:
(1) It's a slider, and calling it something else is confusing.
(2) PhET-iO (and Studio) wants it to look like a slider. You're having to make it look like a slider in the tandem hierarchy by defining
const sliderTandem
, and you won't need to do that if it extends VSlider.(3) For a11y, it should be a slider. This will become more important as other a11y features are added.
(4) If it extends VSlider, you won't need to override
dispose
.So I recommend:
WaterLevelTriangleNode
toWaterLevelSlider
WaterLevelTriangleNode extends VSlider
this.waterLevelTriangle
tothis.waterLevelSlider
in WaterCup3DNode.ts, and change its tandem name to matchThe text was updated successfully, but these errors were encountered: