phetsims / graphing-quadratics

"Graphing Quadratics" is an educational simulation in HTML5, by PhET Interactive Simulations.
MIT License
1 stars 4 forks source link

Feature `rootsNode.*CoordinatesProperty` #194

Closed arouinfar closed 1 year ago

arouinfar commented 1 year ago

For #180

The quadraticProperty contains everything one might want to know about the quadratic except for the roots. Knowing the coordinates of roots seems like useful data, so I think it would be nice to feature rootsNode.*CoordinatesProperty.

I looked through the repo and notes docs to see if this had been considered before but didn't see anything. @pixelzoom if you know of a reason why these were omitted, please let me know. Otherwise, let's feature rootsNode.*CoordinatesProperty.

pixelzoom commented 1 year ago

I don't recall this being considered before. I went ahead and featured rootsNode.leftCoordinatesProperty and rootsNode.rightCoordinatesProperty in the above commits.

But there's another possibility, which may be a better UX... We could add the roots to QuadraticIO, so that they appear in the state object for the value of quadraticProperty. @arouinfar thoughts?

pixelzoom commented 1 year ago

... We could add the roots to QuadraticIO, so that they appear in the state object for the value of quadraticProperty.

@arouinfar and I discussed this. We're not going to do this because (1) no one has asked for it, (2) the roots are already in the data stream, (3) roots are kind of odd, see https://github.com/phetsims/graphing-quadratics/issues/146, and (4) adding roots to state will take a non-trivial amount of time, and likely involved other PhET-iO developers. If someone asked for this in the future, we can add it then.

So... @arouinfar please review rootsNode.leftCoordinatesProperty and rootsNode.rightCoordinatesProperty. Close if OK.

arouinfar commented 1 year ago

Thanks for summarizing @pixelzoom.

So... @arouinfar please review rootsNode.leftCoordinatesProperty and rootsNode.rightCoordinatesProperty. Close if OK.

Looks good, closing.