-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert TimeControlNode to TypeScript #737
Comments
Done in the above commit. Assigning to @samreid for review because gravity-and-orbit required changes. Bugs fixed in TimeControlNode:
Bugs fixed in GravityAndOrbitsTimeControlNode:
Other changes to GravityAndOrbitsTimeControlNode:
|
A couple more changes... The inner classes were getting large, their names weren't quite right, and they could be generally useful outside of TimeControlNode. So I factored them out as follows:
There are a few nested options in TimeControlNode that should probably be changed to match the class names, but I'm wondering if it's worth the trouble:
@samreid thoughts? |
@pixelzoom - There is a line of what looks like some debugging code in
I was going to remove it, but then thought you might still be using it, so I thought I'd just bring it to your attention. |
I reviewed TimeControlNode and tested the usage in Gravity and Orbits. Everything looks good. I made 2 minor commits. I was unfamiliar with the 2nd type parameter in this optionize call, can you add a code comment or comment here about the intent? const options = optionize<TimeControlNodeOptions,
Omit<SelfOptions, 'playPauseStepButtonOptions' | 'speedRadioButtonGroupOptions'>, NodeOptions>()( { Does it mean we don't provide defaults for those options? |
@jbphet or @samreid yes, please remove the console.log in TimeSpeedRadioButtonGroup. Or I'll handle it when I return.
@samreid there's no need for a code comment here. This is a common pattern that PhET developers need to become familair with. It's how nestOptions are treated so that you don't need to provide a EDIT: Issue created, see phetsims/phet-core#127 |
In the commit, I also corrected some backwards <==> forwards metadata problems discovered in https://github.com/phetsims/phet-io/issues/1815 |
Review complete, closing. |
Creating an issue for this one because it's relatively complicated, and it looks like some sim(s) will need review.
The text was updated successfully, but these errors were encountered: