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

Jumping commands only work if an object is picked up #588

Closed KatieWoe closed 1 year ago

KatieWoe commented 1 year ago

Test device Chromebook and Dell Operating System ChromeOS and Win 11 Browser Chrome Problem description For https://github.com/phetsims/qa/issues/993 When using the Home, End, Pg Up, Pg Down, and number key commands to move the cards or soccer balls, they only work if you have picked one up. If you have not and want to move your focus only, you are jumped to the start of the list, or nothing happens.

Troubleshooting information:

!!!!! DO NOT EDIT !!!!! Name: ‪Center and Variability‬ URL: https://phet-dev.colorado.edu/html/center-and-variability/1.1.0-rc.1/phet/center-and-variability_all_phet.html Version: 1.1.0-rc.1 2023-10-09 18:59:20 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/117.0.0.0 Safari/537.36 Language: en-US Window: 1280x643 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: {}
marlitas commented 1 year ago

@catherinecarter I can't remember what we decided here for behavior. Do we want the Home, End, Pg Up, Pg Down keys to be able to select a different card and ball? I think we said those keys should do nothing in that scenario and only function when we have an object grabbed and want to move it. Can you confirm the desired behavior here?

catherinecarter commented 1 year ago

@marlitas - I remember discussing this and have a vague memory of how the behavior wasn't supported in the common code components. I could be incorrect, though.

I think having the option to use the page up/down and end/home keys on the balls and cards prior to picking one up would be great. We would need to decide what the behavior would be for the balls since the behavior currently already skips over number line tick marks when there aren't any balls at the position.

catherinecarter commented 1 year ago

@marlitas and I consulted with @arouinfar, and we decided that the home/end will be implemented on the ball group and the cards, but not update the keyboard help dialog. We will leave this as an Easter egg for users to find.

Also, @marlitas will implement page up/down on the cards but not the balls. Since there are gaps in the stacks of balls, this interaction wouldn't map well or intuitively, so using page up/down only makes sense on the cards.

marlitas commented 1 year ago

The behavior was committed above. I included some refactoring to reduce duplication. This was straightforward and I do not believe it needs a code review before cherry-picking. Marking as ready.

KatieWoe commented 1 year ago

This looks much better in rc.2

KatieWoe commented 1 year ago

I think this was closed prematurely as seen in https://github.com/phetsims/center-and-variability/issues/591. This was in rc.2 as well.

KatieWoe commented 1 year ago

Linking to RC.3 https://github.com/phetsims/qa/issues/999

marlitas commented 1 year ago

The bug in #591 is very isolated, and I believe this issue can be closed.