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

KeyboardHelp content should be specific to each Screen #668

Closed
zepumph opened this issue Sep 29, 2020 · 6 comments
Closed

KeyboardHelp content should be specific to each Screen #668

zepumph opened this issue Sep 29, 2020 · 6 comments

Comments

@zepumph
Copy link
Member

zepumph commented Sep 29, 2020

Over in phetsims/ratio-and-proportion#82 we have a new requirement for keyboard help content which involves screen-specific content. After a length conversation with @jessegreenberg, we decided that the most ideal solution would be to move the keyboardHelpNode option from Sim to Screen. We also want to add an option to Sim.js to opt into having a keyboard help dialog for the whole sim. If you opt in to a keyboard help dialog, but not all screens supply a keyboardHelpNode, then it will just be blank in the dialog.

We wanted to be as flexible as possible, as we know there are cases like CCK that use alt input for the delete key, but don't opt into a keyboard help dialog. We also wanted to be as explicit as possible, which is why we decided to add a new option to Sim, perhaps called keyboardHelpDialog:true. This is will also be a central place, on the Sim level, to describe how keyboard help content can be provided to a phetsim.

Steps for this issue:

  1. Move keyboardHelpNode to Screen
  2. Add Sim.keyboardHelpDialog boolean
  3. refactor logic in KeyboardHelpDialog to support swapping out content based on screen
  4. Refactor all keyboard help contents from Sim options to Screen.
  5. Make sure documentation is updated about how to add keyboardHelp content to a sim
  6. Have someone review this joist change.

@jessegreenberg please add anything else inline if you'd like.

@zepumph zepumph self-assigned this Sep 29, 2020
zepumph added a commit to phetsims/balloons-and-static-electricity that referenced this issue Oct 5, 2020
zepumph added a commit to phetsims/gravity-force-lab-basics that referenced this issue Oct 5, 2020
zepumph added a commit to phetsims/resistance-in-a-wire that referenced this issue Oct 5, 2020
zepumph added a commit to phetsims/molecules-and-light that referenced this issue Oct 5, 2020
zepumph added a commit to phetsims/plinko-probability that referenced this issue Oct 5, 2020
zepumph added a commit to phetsims/gravity-force-lab that referenced this issue Oct 5, 2020
zepumph added a commit to phetsims/john-travoltage that referenced this issue Oct 5, 2020
zepumph added a commit to phetsims/scenery-phet that referenced this issue Oct 5, 2020
zepumph added a commit to phetsims/coulombs-law that referenced this issue Oct 5, 2020
zepumph added a commit to phetsims/faradays-law that referenced this issue Oct 5, 2020
@zepumph
Copy link
Member Author

zepumph commented Oct 5, 2020

Everything has been done. @jessegreenberg please review. From here I can add screen-specific content to RaP over in phetsims/ratio-and-proportion#82.

@zepumph
Copy link
Member Author

zepumph commented Oct 5, 2020

Oh, one more piece, @terracoda, I'm not sure that this part of the design was thought about, but since we now base keyboard help content on each screen, the Home Screen gets needs its own.

I think that the homescreen keyboard dialog will need to pass review by designers, I just made it the basic actions, so every Home Screen keyboard help content looks like this;

image

Adding @terracoda to make sure that this is alright for the homescreen dialog.

@terracoda
Copy link
Contributor

terracoda commented Oct 6, 2020

@zepumph and @jessegreenberg , I think this is great.

I had thought the Home Screen would need a Keyboard Shortcuts dialog, but I had not yet thought about what content would go in it. The Basic Actions make good sense. The home screen mainly has buttons. The only exception being the menu items in the PhET Menu, where I think you need to use the arrows keys.

I've been thinking that it would be a good idea (and likely simplify the code) if we add arrowing through items in a group as a permanent member of basic actions. I can't think of a good reason not to just explain group navigation, and items in a group all the time.

@zepumph
Copy link
Member Author

zepumph commented Oct 6, 2020

Added group content above, and created phetsims/scenery-phet#630 for the general refactor. Thanks for the quick review @terracoda. Over to @jessegreenberg.

@terracoda
Copy link
Contributor

Screen Shot 2020-11-26 at 10 49 12 AM

@jessegreenberg
Copy link
Contributor

The options as described in #668 (comment) look good and are working well, thanks!

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

3 participants