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
TimeControlNode contains a combination of these components, and the exact combination is variable sim-to-sim. Within a sim, there is sometimes variation between screens.
PlayPauseStepButtonGroup
PlayPauseButton
StepForwardButton
StepBackwardButton
SpeedRadioButtonGroup
FastRadioButton
NormalRadioButton
SlowRadioButton
FastForwardButton (e.g. Natural Selection)
RestartButton (e.g. Gravity and Orbits)
It’s unclear if FastForwardButton and RestartButton are actually part of TimeControlNode, or if they have been artificially inserted into the tree structure of TimeControlNode. I assumed the latter and therefore did not review these buttons in detail. If I am incorrect, please let me know and I will review.
The goals of the TimeControlNode are highly sim-dependent, so there needs to be flexibility to allow for developers to opt-out of subcomponent instrumentation, see #826. This issue also documents a variety of dynamic layout issues currently present.
Add warnings/documentation/whatever appropriate to the code to remind devs that regardless of what view elements may have been opted-out, isPlayingProperty and timeSpeedProperty should still always be instrumented.
If it’s not possible to handle LinkedProperties in common code as requested below, add documentation to remind devs that there should be a LinkedProperty to isPlayingProperty and timeSpeedProperty if the corresponding view elements are instrumented.
Review the listeners and emitters to determine if there are redundancies.
Determine what migration rules will be necessary.
PlayPauseStepButtonGroup
Verify that visibleProperty and enabledProperty are instrumented in common code and that they are phetioFeatured: true.
PlayPauseButton
Uninstrument ToggleNode.
Optional: There is no need to ever instrument a ToggleButton’s ToggleNode, so it might be worth searching through common code for other instances of this instrumentation and ripping it out.
Verify there is a LinkedProperty to isPlayingProperty, and if not, add it.
Verify that these are the only associated elements that are featured:
isPlayingProperty
visibleProperty
enabledProperty
Step Buttons
Uninstrument enabledProperty. It depends on isPlayingProperty and should never be client-controlled. (Nor should clients care to ask the sim if the button is enabled or not.)
The only featured element should be visibleProperty.
SpeedRadioButtonGroup
Verify there is a LinkedProperty to timeSpeedProperty, and if not, add it.
Verify that these are the only elements associated with the GROUP that are featured:
timeSpeedProperty
visibleProperty
enabledProperty
The individual radio buttons are a bit over-instrumented (no need for enabledProperty, for example), but RadioButtonGroup is on the docket for API cleanup and will be tracked in a separate issue.
The text was updated successfully, but these errors were encountered:
TimeControlNode contains a combination of these components, and the exact combination is variable sim-to-sim. Within a sim, there is sometimes variation between screens.
It’s unclear if FastForwardButton and RestartButton are actually part of TimeControlNode, or if they have been artificially inserted into the tree structure of TimeControlNode. I assumed the latter and therefore did not review these buttons in detail. If I am incorrect, please let me know and I will review.
The goals of the TimeControlNode are highly sim-dependent, so there needs to be flexibility to allow for developers to opt-out of subcomponent instrumentation, see #826. This issue also documents a variety of dynamic layout issues currently present.
In general:
isPlayingProperty
andtimeSpeedProperty
should still always be instrumented.isPlayingProperty
andtimeSpeedProperty
if the corresponding view elements are instrumented.PlayPauseStepButtonGroup
visibleProperty
andenabledProperty
are instrumented in common code and that they arephetioFeatured: true
.PlayPauseButton
isPlayingProperty
, and if not, add it.isPlayingProperty
visibleProperty
enabledProperty
Step Buttons
enabledProperty
. It depends onisPlayingProperty
and should never be client-controlled. (Nor should clients care to ask the sim if the button is enabled or not.)visibleProperty
.SpeedRadioButtonGroup
timeSpeedProperty
, and if not, add it.timeSpeedProperty
visibleProperty
enabledProperty
enabledProperty
, for example), but RadioButtonGroup is on the docket for API cleanup and will be tracked in a separate issue.The text was updated successfully, but these errors were encountered: