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

Auto-slide for bar magnet not working as expected on Main #226

Closed
terracoda opened this issue Dec 22, 2023 · 5 comments
Closed

Auto-slide for bar magnet not working as expected on Main #226

terracoda opened this issue Dec 22, 2023 · 5 comments

Comments

@terracoda
Copy link

Over in phetsims/faradays-electromagnetic-lab#25, @pixelzoom and @terracoda both tested the auto-slide interaction of the bar magnet. It was behaving as expected in the published version for @terracoda, but was not behaving as expected on main for @pixelzoom.

The auto-slide behavior and alternative input for the bar magnet likely needs retesting before any maintenance releases of this sim.

The expected behavior is outlined in phetsims/faradays-electromagnetic-lab#25 (comment)

@terracoda
Copy link
Author

Leaving this issue unassigned, but mentioning @jessegreenberg and @zepumph in case this is a known issue, or if it relates to any general alt input work.

@pixelzoom
Copy link
Contributor

pixelzoom commented Dec 22, 2023

Specifically phetsims/faradays-electromagnetic-lab#25 (comment):

... I have not figured out how to stop the auto-slide -- I tried space, return, tabbing away -- and this seems like a bug or oversight.

And @terracoda describes the correct behavior in phetsims/faradays-electromagnetic-lab#25 (comment).

Leaving this issue unassigned, but mentioning @jessegreenberg and @zepumph in case this is a known issue, or if it relates to any general alt input work.

If we'd like to use this in FEL, then it needs to be fixed before I can incorporate it there. So assigning to @arouinfar @jessegreenberg and @zepumph to decided how to proceed. High priority since FEL is nearly feature complete, and another form of alt input has already been implemented for the bar magnet.

@pixelzoom
Copy link
Contributor

@jessegreenberg @zepumph I'd also be interested in where this behavior is implemented, how close it is to being generalized enough that it's usable elsewhere, and whether you think it can/should be moved to common code.

@jessegreenberg
Copy link
Contributor

Yes, I reproduced the issue on main. I found it was from the conversion to KeyboardListener, it is fixed by the above commit.

The implementation is in MagnetAutoSlideKeyboardListener.js. It is specific to faradays-law right now but it could be generalized if the same behavior is needed for another sim.

@zepumph zepumph removed their assignment Dec 22, 2023
@pixelzoom
Copy link
Contributor

pixelzoom commented Dec 27, 2023

I verified that this is now working as expected in main -- that is, as @terracoda described in phetsims/faradays-electromagnetic-lab#25 (comment).

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants