phetsims / graphing-quadratics

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

Vertex coordinates don't always reset to default position #207

Open Nancy-Salpepi opened 7 months ago

Nancy-Salpepi commented 7 months ago

Test device MacBook Air M1 chip

Operating System 14.4.1

Browser Safari 17.4.1

Problem description Seen while testing https://github.com/phetsims/graphing-quadratics/issues/206: On the Vertex Form Screen, if Reset All is pressed while the vertex is at (0,0) and 'a' has a negative value, the coordinates will appear above the vertex on Reset All instead of below. This issue wasn't due to any changes in #206. I can reproduce it in 1.3.0 but not in 1.2.0.

Steps to reproduce

  1. On the Vertex Form screen change the value of 'a' to -1.
  2. Press Reset All

Visuals

https://github.com/phetsims/graphing-quadratics/assets/87318828/8a0f4b74-d6f2-4ce0-bf74-5165486d2dbe

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Graphing Quadratics‬ URL: https://phet.colorado.edu/sims/html/graphing-quadratics/latest/graphing-quadratics_all.html Version: 1.3.7 2024-04-08 16:44:42 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15 Language: en-US Window: 1330x706 Pixel Ratio: 2/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 (1.0) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}
pixelzoom commented 7 months ago

Reproduced in 1.3.7 (published) and in main.

CoordinatesNode displayes the coordinates, e.g. "(0, 0)".

GQManipulator handles the position of CoordinatesNode, see GQManipulatorOptions.layoutCoordinates.

pixelzoom commented 7 months ago

There's a similar problem in the Standard Form screen, where the vertex is a non-interactive point (PointNode).

Steps to reproduce:

  1. Go to Standard Form screen, press Reset All button if you've previously changed anything.
  2. Check the "Vertex" checkbox. Note that "(0, 0)" is below the curve.
  3. Set a to -1. Note that "(0, 0)" is now above the curve.
  4. Press Reset All button.
  5. Check the "Vertex" checkbox. Note that "(0, 0)" is now incorrectly above the curve, as in the screenshot below.
screenshot_3206
pixelzoom commented 7 months ago

This may have been introduced during conversion to TypeScript in https://github.com/phetsims/graphing-quadratics/commit/3ba9ac490f556ac47a108ecad52979bdb2a6add0.

pixelzoom commented 7 months ago

@Nancy-Salpepi please verify in main. Assign back to me when you're done. I'll ruminate on whether to do an MR.

Nancy-Salpepi commented 7 months ago

Looks fixed in main @pixelzoom. Happy ruminating.

pixelzoom commented 7 months ago

My ruminating tells me that since this has little to no affect on usability, there's no reason to do an MR. I'll label as fixed-awaiting-deploy in case it's reported again before the next publication.