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

Sorted celebration may not trigger if last item is between two identical items #115

Closed KatieWoe closed 2 years ago

KatieWoe commented 2 years ago

Test device Dell Operating System Win 11 Browser Firefox Problem description For https://github.com/phetsims/qa/issues/789. When hand sorting the cards on the first screen, if the last card you move into position is put in the middle (or beginning) of a group of the same number, the celebratory "you sorted the data" will not appear. You'll need to move an item and resort it to get it to appear. If you put the card at the end of a group the alert does play. Steps to reproduce

  1. Go to the first page
  2. Kick all 15 soccer balls
  3. Make sure at least one number has 2, preferably three balls.
  4. Sort the cards, saving one of the target number cards for last
  5. When moving the last card, put in the middle of it's group

Visuals nocelebrate

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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.82 Safari/537.36 Language: en-US Window: 1280x649 Pixel Ratio: 1.5/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: 30 uniform: 4096 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 32767x32767 OES_texture_float: true Dependencies JSON: {}
Nancy-Salpepi commented 2 years ago

possibly related to what was reported in https://github.com/phetsims/center-and-variability/issues/85 ?

KatieWoe commented 2 years ago

Looks like it. Good catch.

samreid commented 2 years ago

@chrisklus and I addressed the case above and it appears to be working OK. However, we are aware the solution will not correctly handle multitouch. For instance, if the user has 68669, then starts drag on the leftmost 6 and drags it between the middle 6s (without letting go), then grabs the 9, then releases the 6 between the other 6s, then drops the 9, the data would be newly sorted but the algorithm would not detect it due to this multitouch flaw. But we thought this might be OK for the current milestone. @KatieWoe can you please test and mark for cherry-picking if all is well?

amanda-phet commented 2 years ago

Since this is a really specific sequence of multi-touch steps, the solution here is fine for the classroom prototype milestone.

samreid commented 2 years ago

I recommend this new implementation be tested before creating the next RC. @KatieWoe can you please take a look?

KatieWoe commented 2 years ago

The issue seems fixed on master

chrisklus commented 2 years ago

@samreid and I spot-checked this for https://github.com/phetsims/center-and-variability/issues/122, closing.