Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling interaction on singular soccer balls is odd when balls are stacked #344

Closed
Tracked by #1135
KatieWoe opened this issue Aug 14, 2024 · 6 comments
Closed
Tracked by #1135
Assignees
Labels
status:ready-for-qa type:bug Something isn't working

Comments

@KatieWoe
Copy link

Device
Samsung Laptop
OS
Win 11
Browser
Firefox
Problem Description
For phetsims/qa#1134. Seens when exploring #337.
When you use the ctrl/alt shortcuts in studio to look at individual soccerballs, only alt(view) works, ctrl only takes you to view, not to model. If the balls are stacked, you can only use the shortcuts to look at the soccerball on the top of the stack, but only by having your cursor on a lower ball. If a ball on the top of a stack is disabled, you can't use keyboard nav to focus on or move the lower balls.
Visuals
ballfocus

@KatieWoe KatieWoe added the type:bug Something isn't working label Aug 14, 2024
@jbphet jbphet assigned jbphet and unassigned marlitas Aug 15, 2024
jbphet added a commit to phetsims/soccer-common that referenced this issue Aug 15, 2024
@jbphet
Copy link
Contributor

jbphet commented Aug 15, 2024

With help from @zepumph, the first portion of the reported problem has been addressed, so now ctrl-hover will go to the phet-io ID for the soccer ball model elements and not the view nodes.

As for the other reported problem - where the bottom balls on a stack can't be reference via alt-hover or ctrl-hover - @zepumph and I looked at this for a while and decided to recommend that we live with this behavior. The problem is due to the fact that the pointer areas for the top balls on the stack are extended to cover the whole stack so that users can't grab balls within the stack (see screenshot below). We could potentially work around this through some sort of scheme where the hit test checks for balls that are lower in the stack and whether those are actually the intended target for phet-io interactions, but the code would be quite complex. This use case seems rare, and the problem is easy to work around, so the additional complexity and time to address doesn't seem worth it in my opinion.

image

Assigning to @marlitas to review the change and to see if she concurs with the recommendation.

@marlitas
Copy link
Contributor

I agree, it is not worth investigating that hover behavior for the stacked balls. Tagging @amanda-phet and @catherinecarter so that they are both aware.

I looked at the change and tested the behavior I believe this is ready for cherry-pick. Thanks!

@amanda-phet
Copy link
Contributor

I agree. Thanks for letting us know!

@KatieWoe
Copy link
Author

Ctrl still selects the top ball only, even if hovering over lower balls, but you can hover over the top ball as well now. Is this the intended behavior?

@marlitas
Copy link
Contributor

@KatieWoe, yes! That is the intended behavior.

@marlitas marlitas assigned KatieWoe and unassigned marlitas Aug 20, 2024
@KatieWoe
Copy link
Author

Closing then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready-for-qa type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants