phetsims / friction

"Friction" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/friction
GNU General Public License v3.0
4 stars 6 forks source link

Possible to drag both books simultaneously with multitouch #335

Closed Nancy-Salpepi closed 1 year ago

Nancy-Salpepi commented 1 year ago

Test device iPad 9th generation

Operating System 16.3

Browser Safari

Problem description For https://github.com/phetsims/qa/issues/886, with multitouch it is possible to drag the Chemistry Book and Zoomed-in Chemistry book at the same time.

Steps to reproduce

  1. Grab Chemistry Book with 1 finger and Zoomed-in Chemistry Book with a different finger
  2. Move books in opposite directions

Visuals

https://user-images.githubusercontent.com/87318828/216349176-825d87ac-a909-4f35-bccb-095b72de74bd.mov

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Friction‬ URL: https://phet-dev.colorado.edu/html/friction/1.6.0-rc.1/phet/friction_all_phet.html Version: 1.6.0-rc.1 2023-01-17 16:32:22 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/109.0.0.0 Safari/537.36 Language: en-US Window: 1600x781 Pixel Ratio: 1.7999999523162842/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: {}
jessegreenberg commented 1 year ago

Looking into this now, here is one way to do it (but there are many)

@zepumph (responsible dev) does that strategy sound OK to you?

jessegreenberg commented 1 year ago

Alternatively, DragListener has a isUserControlledProperty which could replace the first three bullet points above and the proposed userInteractionProperty. There is no equivalent for KeyboardDragListener, we could add one or not.

zepumph commented 1 year ago

Controversial thought here:

I don't see the big deal. You are using both at the same time, you will have them fighting. If you want that behavior to stop, then stop using both at the same time. In my experience testing locally, there is no inconsistent state that occurs after a multi touch interaction like this, you can just use it normally afterwards.

I perhaps don't know PhET's general policy about something like this, but since it doesn't cause usability concerns, and has never blocked publication of previous versions. I would prefer to mark this as a wontfix. @jessegreenberg's solutions above seem solid if we want to add this to the RC though.

zepumph commented 1 year ago

@arouinfar what do you think?

jessegreenberg commented 1 year ago

That is a good thought, and I agree. This behavior is in the published version as well, it is not new.

arouinfar commented 1 year ago

@zepumph I agree. It looks the sim is reasonably well-behaved during the multitouch event, and then goes back to normal. This isn't causing any real UX problems, so I think we can pass, but thanks @jessegreenberg for providing a solution if one is needed in the future.

zepumph commented 1 year ago

Great, thanks everyone.