phetsims / number-compare

"Number Compare" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 0 forks source link

"incorrect" objects can't always automatically move off ten frame #30

Closed Nancy-Salpepi closed 1 year ago

Nancy-Salpepi commented 1 year ago

Test device MacBook Air M1 chip and iPad 9th generation

Operating System 13.2.1 and 16.3.1

Browser Safari

Problem description For https://github.com/phetsims/qa/issues/917, on the Lab Screen: If I try to add an object that "doesn't belong" to a partially filled ten frame located at the top or side of a play area, that object can't move up any further or to the side any further so it stays where I placed it.

Steps to reproduce

  1. On the Lab Screen, place a ten frame in the top left of the play area
  2. Add an apple
  3. Move a dog to the square right of the apple and let go.
  4. Move a dog to the square underneath the apple and let go.

Visuals

Screenshot 2023-03-17 at 8 48 47 AM Screenshot 2023-03-17 at 8 49 32 AM
amanda-phet commented 1 year ago

This is indeed a bad user experience. Discussed with @chrisklus and the current logic is to look for the nearest spot outside the ten frame, but the code doesn't check for whether that spot is in bounds or not. Chris will spend 30 minutes exploring how doable this is, and if it's going to be too much developer time and/or introduce other weird behavior, we need to not fix this until a client asks for this behavior.

Nancy-Salpepi commented 1 year ago

also noting something similar when ten frames partially overlap:

https://user-images.githubusercontent.com/87318828/227606411-05280d98-6233-4332-8a2f-676f3c2c8c87.mp4

zepumph commented 1 year ago

Part of this has been fixed by #29 where the potential for return button bounds narrowed the left draggable dimension by at least the width of a CountingObject. I will still need to look into the other kinds of cases. I think that https://github.com/phetsims/number-compare/issues/30#issuecomment-1483221122 may be excusable since it is such a specific case (should still check with @amanda-phet though), but the top case should be detected for. Looks like the bottom isn't an issue because the tenframe will just be returned to the toolbox.

chrisklus commented 1 year ago

@zepumph or @chrisklus can take this, see TenFrame.pushAwayCountingObject

zepumph commented 1 year ago

@chrisklus and I got this working. @Nancy-Salpepi can you please provide us with your testing prowess and feel free to close is all is well.

Nancy-Salpepi commented 1 year ago

What I noted in my original comment is fixed! The objects can now move off the ten frame! They do tend to end up on top of one another though. I didn't know if that was OK or not. Sending it back to you guys for a final decision.

https://user-images.githubusercontent.com/87318828/228395259-29953a00-47d5-4d33-ad72-d069e10c148d.mp4

zepumph commented 1 year ago

I'm not too worried about this, but perhaps it would be good to come back to this problem after we have sorted out https://github.com/phetsims/number-play/issues/172 (today), that is about a very similar issue that we may want to apply here as well.

amanda-phet commented 1 year ago

This is unfortunate, but the Lab screen here mimics the Fractions Lab screen, and users can place things right on top of others and it seems to be acceptable behavior for this kind of screen. I'm ok allowing objects to stack in this way.

chrisklus commented 1 year ago

Thanks for weighing in @amanda-phet. I think that means we are good to close here. Thanks for all of your time figuring out these cases @Nancy-Salpepi!