Closed KatieWoe closed 3 years ago
Thanks @KatieWoe . I just reviewed some other recent client request files and I see that Amy has been outlining the properties by screen, so I can do that. I used those two screens as examples because the instructional designer might achieve the goal in two different way, and Standard Form screen seemed repetitive, but I can add that now since we'll be doing another RC anyway.
@amanda-phet I'm assuming that you're going to address this for the 1.2 release, so I'm labeling as "blocks-sim-publication". When you've made the change, please assign to me for cherry-picking.
OK I made this as comprehensive as possible and added all of the relevant properties. @pixelzoom the commit should be right above this comment.
Patched in the 1.2 branch, ready for testing in the next RC. To test:
The coordinatesNode does not seem to be featured. It also does not change the state of the checkbox. Is this alright?
Otherwise this looks ok
The coordinatesNode does not seem to be featured.
It does seem like if it's important enough to be described in Client Requests guide, then it should be featured. But that's up to @amanda-phet. If you want to feature it, please edit overrides.js, and let me know that I need to cherry-pick.
It also does not change the state of the checkbox. Is this alright?
No, this is a problem. All elements named coordinatesNode.visibleProperty
currently have their own visibleProperty
, which is not connected to viewProperties.coordinatesVisibleProperty
. You can change coordinatesNode.visibleProperty
for one manipulator, and then overwrite it by toggling viewProperties.coordinatesVisibleProperty
.
Options for addressing this, from least to most cost:
(1) Do nothing.
(2) Set all coordinatesNode.visibleProperty
to phetioReadOnly: true
. This would work fine, will take ~15 minutes.
(3) Pass viewProperties.coordinatesVisibleProperty
through to each coordinatesNode
. Each coordinatesNode
will then have a link back to viewProperties.coordinatesVisibleProperty
in Studio. This is the most current pattern, more programming involved, ~1 hour.
I recommend (3). @amanda-phet is that OK with you?
(3) actually turned out to be pretty easy, ~15 minutes of work. But...
@amanda-phet if we do (2) or (3) in the comment above, then you'll need to rewrite this section of the Client Guide again. The client will not (and should not!) be able to set coordinatesNode.visibleProperty
for manipulators and points, like the vertex. The visibility of all coordinates will be linked to viewProperties.coordinatesVisibleProperty
, which is the Property controlled by the "Coordinates" checkbox.
Note to self, here's the patch to implement this:
@amanda-phet and I discussed on Zoom.
I should definitely link each coordinatesNode.visibleProperty
to viewProperties.coordinatesVisibleProperty
, since that's the new PhET-iO pattern. To not do so here would be wrong.
It's unclear to me what the goal of "Hide coordinates of the vertex" is. Does it mean to control the visiblity of vertex coordinates independently from the visibility of all other coordinates? Does it apply only to the vertex (why?) or to potentially any point's coordinates? If independent control is indeed needed, then there is more work to be done here -- any coordinate whose visibility needs to be controlled independently will need to be wrapped in a new Node, whose visibleProperty
can be used to independently hide those coordinates.
Give the amount of work involved... If "Hide coordinates of the vertex" was not actually requested by a client, and was something that PhET thought would be nice to have, then I recommend that we delete this section from the Client Requests guide, and wait until a client asks for something like this.
I discussed this with @kathy-phet and @arouinfar and it seems like it makes the most sense to follow current patterns and go with option (3).
We confirmed that there is no actual client request for this feature, so I will remove it from the client guide.
If a client does want this functionality in the future (to be able to hide specific coordinate and not all coordinates), it sounds like we would need up to up to 3 new properties per screen (3 for the Focus & Directrix screen, but fewer for previous screens) that combine with viewProperties.coordinatesVisibleProperty
to control visibility. This means the individual coordinates would need to be true AND viewProperties.coordinatesVisibleProperty
would need to be true to display the specific coordinates. We can return to this if a client requests this in the future.
I think this is in line with what you said here:
If independent control is indeed needed, then there is more work to be done here -- any coordinate whose visibility needs to be controlled independently will need to be wrapped in a new Node, whose visibleProperty can be used to independently hide those coordinates.
Yes, your understanding of the future plan is correct.
I'll cherry-pick the Client Guide change, then proceed with applying the patch that I created above.
Done in the above commits, for master and 1.2 branches.
@amanda-phet please verify in master. Run the sim in Studio, inspect the 7 instances of coordinatesNode.visibleProperty
. You should see that they are linked to viewProperty.coordinatesVisibleProperty
. And if you toggle viewProperty.coordinatesVisibleProperty
, you should see the visibility of all coordinates change, for static points, and interactive manipulators.
That all looks correct to me.
Ready for testing in the next RC.
To verify:
coordinatesNode.visibleProperty
. You should see that they are all linked to viewProperty.coordinatesVisibleProperty
.It seems to be viewProperties.coordinatesVisibleProperty
instead. Is that alright?
Otherwise this looks ok. If https://github.com/phetsims/graphing-quadratics/issues/171#issuecomment-915406793 is alright, feel free to close.
It seems to be viewProperties.coordinatesVisibleProperty instead. Is that alright?
Yes, that's right @KatieWoe . I think it was just a typo.
For https://github.com/phetsims/qa/issues/700. I noticed that for the "Hide Coordinates of the Vertex" section, the Standard Form screen did not have instructions, even though it has a vertex and coordinates. I also noticed that vertex form screen did not have the checkbox enabled option but the focus and directrix screen did.