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

Support for alternative input #249

Open
8 of 9 tasks
pixelzoom opened this issue Oct 3, 2022 · 21 comments
Open
8 of 9 tasks

Support for alternative input #249

pixelzoom opened this issue Oct 3, 2022 · 21 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Oct 3, 2022

@kathy-phet asked me to add alternative input to ph-scale and ph-scale-basics.

This includes:

  • add "supportsInteractiveDescription": true to package.json
  • keyboard traversal order
  • KeyboardDragListener for pH probe in the Macro screen
  • KeyboardDragListener for water faucets in Macro and Micro screens - common code, see Alternative input design for FaucetNode scenery-phet#773
  • KeyboardDragListener for dropper in Macro and Micro screens
  • PressListener for momentary button on dropper - common code, see Alt input is broken for momentary buttons. sun#796
  • KeyboardDragListener for interactive graph indicators in the MySolution screen
  • hot keys?
  • keyboard help dialogs
@pixelzoom pixelzoom self-assigned this Oct 3, 2022
@pixelzoom
Copy link
Contributor Author

@kathy-phet @arouinfar FYI...

After discussion with @arouinfar, here's the list of things that are not going to be straightforward:

  • Momentary button on dropper
  • Dragging the dropper while the momentary button is pressed
  • Faucet interaction and keyboard help, because it's common code (will require design)
  • Which draggable things should have their own keyboard help, vs something like "Move Draggable Items" (MoveDraggableItemsKeyboardHelpSection) that appears in Geometric Optics?

@pixelzoom
Copy link
Contributor Author

After consulting with @arouinfar, no hot keys are necessary.

pixelzoom added a commit to phetsims/ph-scale-basics that referenced this issue Oct 3, 2022
pixelzoom added a commit that referenced this issue Oct 3, 2022
pixelzoom added a commit that referenced this issue Oct 3, 2022
pixelzoom added a commit that referenced this issue Oct 3, 2022
pixelzoom added a commit that referenced this issue Oct 3, 2022
pixelzoom added a commit to phetsims/ph-scale-basics that referenced this issue Oct 4, 2022
pixelzoom added a commit that referenced this issue Oct 4, 2022
pixelzoom added a commit that referenced this issue Oct 4, 2022
pixelzoom added a commit that referenced this issue Oct 4, 2022
pixelzoom added a commit that referenced this issue Oct 4, 2022
pixelzoom added a commit that referenced this issue Oct 4, 2022
pixelzoom added a commit that referenced this issue Oct 4, 2022
@pixelzoom
Copy link
Contributor Author

pixelzoom commented Oct 5, 2022

Alt input for ph-scale is currently blocked by 2 issues:

That said, it's at a point where it's ready for @arouinfar to review.

I took my best guess at traveral order and keyboard help.

KeyboardDragListeners (for the draggable things) are configured like this:

  • eye dropper: dragVelocity: 300, shiftDragVelocity: 20
  • pH probe: dragVelocity: 300, shiftDragVelocity: 20
  • graph indicators: dragVelocity: 300, shiftDragVelocity: 40 (the indicator will not move with smaller values, due to precision of the model value)

Let me know what you'd like to change. And assign this issue back to me. Thanks!

@pixelzoom pixelzoom assigned arouinfar and unassigned pixelzoom Oct 5, 2022
@pixelzoom
Copy link
Contributor Author

pixelzoom commented Nov 18, 2022

In the above commits, I also commented out createKeyboardHelpNode in all Screens. Otherwise the keyboard help is created and disposed by the State wrapper, and we'll have the memory leak. These lines of code (noted with a TODO referencing this issue) should be restored when work on this is resumed.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Aug 14, 2024

In 2d1e8b0, @jonathanolson added "supportsInteractiveDescription": true to package.json for the Description prototype. This turns on alt input, which is still not completely supported. So labeling this issue as blocks-sim-publication.

As for the status of alt input...

@jonathanolson jonathanolson self-assigned this Aug 14, 2024
jonathanolson added a commit to phetsims/ph-scale-basics that referenced this issue Aug 14, 2024
jonathanolson added a commit that referenced this issue Aug 14, 2024
@pixelzoom
Copy link
Contributor Author

420ac61 by @jonathanolson will need to be reviewed when work on alternative input resumes. That change prevents setting the pdomOrder when running with ?supportsDescriptionPlugin.

@jonathanolson
Copy link
Contributor

Noted in discussions that the description logic plugin will control the pdomOrder when the query parameter is true.

Additionally, committed above to put the DescriptionRegistry change above under the query parameter, so that our sim actions are 100% query parameter feature-flag controlled.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Sep 4, 2024

In Slack#description-tooling, there was a request to add alt input support for FaucetNode. That support has been available for a long time. The issue is that alt input is "off" for ph-scale and ph-scale-basics. So...

As a result of the above commits, alt input is now "on" by default for ph-scale and ph-scale-basics. I checked FaucetNode, and it’s working as expected. Both sims also have the “Faucet Controls” section in their keyboard help.

@pixelzoom
Copy link
Contributor Author

At 10/10/24 iteration planning meeting, this work was put on hold.

@pixelzoom pixelzoom removed their assignment Oct 14, 2024
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

4 participants