phetsims / center-and-variability

"Center and Variability" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 2 forks source link

Disappearance of median brackets is inconsistent #106

Closed Nancy-Salpepi closed 2 years ago

Nancy-Salpepi commented 2 years ago

Test device Dell

Operating System Windows 10

Browser Chrome

Problem description For https://github.com/phetsims/qa/issues/789

After the data is sorted, if I move soccer balls so that the median value doesn't change but the cards are out of order, the median brackets do not disappear. However, when a move a card, without changing the median value, the brackets do disappear. The brackets do disappear if dragging the soccer ball causes the median value to change.

Steps to reproduce

  1. On the median screen, kick several balls
  2. Check the Median checkbox in the accordion panel
  3. Sort the data manually (or check and then uncheck the Sort Data checkbox)
  4. Drag a soccer ball so that its card is now out of order but the median value stays the same--Median brackets are still there
  5. Move a card--brackets disappear

Visuals

https://user-images.githubusercontent.com/87318828/159776389-7cd796ee-a8fc-4d6c-bb65-ffcc2318e81a.mp4

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Center and Variability‬ URL: https://phet-dev.colorado.edu/html/center-and-variability/1.0.0-rc.1/phet/center-and-variability_all_phet.html Version: 1.0.0-rc.1 2022-03-21 16:46:53 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.83 Safari/537.36 Language: en-US Window: 1431x633 Pixel Ratio: 2/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 31 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}
Nancy-Salpepi commented 2 years ago

It can look really odd in some cases:

Screen Shot 2022-03-23 at 3 11 26 PM
amanda-phet commented 2 years ago

Definitely a problem! If you drag a ball and the value changes, then the median bars should only stay there if the data remains sorted.

Nancy-Salpepi commented 2 years ago

I also noticed that if the ball that is moved is linked to the middle sorted card, then the median bars never disappear--even if the median value changes.

https://user-images.githubusercontent.com/87318828/159965813-659cb7db-271b-42cb-811c-aaf7a866cfa4.mp4

Nancy-Salpepi commented 2 years ago

In the State wrapper--the median bars disappear in the downstream wrapper (but remain in the upstream when they shouldn't).

https://user-images.githubusercontent.com/87318828/160407589-3c6ede5c-3b6d-4551-9b4d-4ecb2f3ad57f.mp4

chrisklus commented 2 years ago

Thanks @Nancy-Salpepi! Marking for the April milestone.

chrisklus commented 2 years ago

@samreid and I committed a fix above. @Nancy-Salpepi could you please test on phettest?

chrisklus commented 2 years ago

If it seems fixed, please leave open and relabel as status:ready-to-cherry-pick, thanks!

Nancy-Salpepi commented 2 years ago

Looks good!

samreid commented 2 years ago

@chrisklus and I confirmed this is fixed in in https://github.com/phetsims/center-and-variability/issues/122, closing.