-
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
Generalize Stopwatch and StopwatchNode #170
Comments
This seems reasonable. But I won't have time to evaluate for about a week. In the meantime, gas-properties is in the middle of RC testing for a maintenance release. I'd appreciate it if we didn't make changes to gas-properties master until that maintenance release is published, because it may complicate cherry picking. |
By the way... There are a couple of things that I really don't like about
For both of these flaws, we chose to live with them in Gas Properties. |
I said:
When I wrote that, Gas Properties 1.0.1 RC testing was close to completion. But it has now been downgraded to "medium" priority (see phetsims/qa#415 (comment)) and the QA queue looks pretty full. phetsims/circuit-construction-kit-common#449 says "Publish CCK AC 1.0 by January 31, 2020" so maybe that's OK. Mentioning @samreid and @ariel-phet, in case there needs to be any priority adjustment. |
Assigning back to @samreid. Feel free to proceed when Gas Properties 1.0.1 has been published, addressing (or not) concerns that I noted in #170 (comment) as the design team sees fit. |
One thing that I just noticed... All |
Tagging as potential work for phetsims/circuit-construction-kit-common#528 |
Gas Properties 1.0.3 has been published. I'll take a look around. |
Note that the proposed renamings in phetsims/scenery-phet#530 will affect how this work can be done, since there could be naming collisions. |
I understand that work has resumed on this. Are you addressing any of the problems identified in #170 (comment)? |
I reviewed both of those requests but have not begun investigating them. My initial commits will focus on:
|
I've completed an initial pass of this work, I'll begin commits and pushes. I've marked several TODOs referring to this issue which should be done after initial pushes, or, in many cases, converted to new issues. |
I opened issues for other repos where review will be required. I'll now push changes for Gas Properties and common code changes linked to this issue. Note there are still 9 TODOs marked referencing this issue. As noted above, these should addressed after initial pushes, or converted to issues. I'm still working on this and will reassign to @pixelzoom once it's ready for review. I'll hold off on requesting reviews in the other repos (linked above) until this issue is complete, so we can make sure the API is finalized. |
There are still problems in both Stopwatch and StopwatchNode. In Stopwatch, you didn't follow the pattern of putting disposal in In StopwatchNode:
Back to @samreid to address these remaining issues. |
Those are conflated at the moment, the docs for that option are: visibleBoundsProperty: null, // {Property.<Bounds2>|null} if provided, the node is draggable within the bounds That is to say, if visibleBoundsProperty is not provided, the node is not draggable at all. How do you recommend to proceed? |
I made that change in phetsims/scenery-phet@e3f49a7 then CT pointed out that it is used for drag forwarding. So restored it in phetsims/scenery-phet@49c38f2 and annotated it as |
Where is
Sounds like a bug. If there are no drag bounds, then StopwatchNode should still be draggable, with no constraints on the drag bounds. |
Would you recommend a boolean Where is
The existing implementation seems straightforward to me, but I'd love to hear a better one. |
I guess we can still with Thanks for clarifying about |
Good idea, I added a note. Anything else to do for this issue? |
Looks good. Thanks for tackling this issue. Closing. |
The design for Circuit Construction Kit: AC calls for a stopwatch. I noticed that gas-properties/js/common/model/Stopwatch.js and gas-properties/js/common/view/StopwatchNode.js look like good candidates for generalization. They have features that most other sims will need to leverage as well, including moveToFront, interrupting user interactions, dragging, drag bounds, etc. I would be duplicating most of this for the development for CCK, and some of this may already be duplicated in other sims with draggable stopwatches. The main sim-specific parts (units and color) could be moved to options.
Discovered in conjunction with phetsims/scenery-phet#530
@pixelzoom what do you think?
UPDATE: Tagging for phetsims/circuit-construction-kit-common#449
The text was updated successfully, but these errors were encountered: