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

Updates to BasicActionsKeyboardHelpSection keyboard section for basic alt-input #93

Closed
zepumph opened this issue Mar 8, 2023 · 16 comments

Comments

@zepumph
Copy link
Member

zepumph commented Mar 8, 2023

From alt input meeting today, and from #86.

@Matthew-Moore240 will take a first pass on it.

@zepumph
Copy link
Member Author

zepumph commented Mar 8, 2023

An idea from the meeting. Add 2 more items to the "basic actions" section:

  1. 2d dragging. "Navigate to the draggable and move the arrow keys to drag me!"
  2. Keypad interaction "Type numbers, backspace, decimal, minus to use the keypad".

image

Please provide for each row:

  1. visual look of the row
  2. described pdom content
  3. placement of the row in the section.

@zepumph
Copy link
Member Author

zepumph commented Mar 8, 2023

patch to add basic section to MSS:

Subject: [PATCH] translatable strings for hot key help content, https://github.com/phetsims/scenery-phet/issues/797
---
Index: js/lab/LabScreen.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/lab/LabScreen.ts b/js/lab/LabScreen.ts
--- a/js/lab/LabScreen.ts	(revision 68f366b3d1f9550b8c58c91dd3c699fdde8a94e2)
+++ b/js/lab/LabScreen.ts	(date 1678313569678)
@@ -14,6 +14,7 @@
 import LabScreenView from './view/LabScreenView.js';
 import LabScreenIcon from './view/LabScreenIcon.js';
 import MySolarSystemStrings from '../MySolarSystemStrings.js';
+import BasicActionsKeyboardHelpSection from '../../../scenery-phet/js/keyboard/help/BasicActionsKeyboardHelpSection.js';
 
 class LabScreen extends Screen<LabModel, LabScreenView> {
 
@@ -23,7 +24,10 @@
       homeScreenIcon: new LabScreenIcon(),
       backgroundColorProperty: SolarSystemCommonColors.backgroundProperty,
       tandem: tandem,
-      name: MySolarSystemStrings.screen.labStringProperty
+      name: MySolarSystemStrings.screen.labStringProperty,
+      createKeyboardHelpNode: () => {
+        return new BasicActionsKeyboardHelpSection( { withCheckboxContent: true } );
+      }
     };
 
     super(
Index: js/intro/IntroScreen.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/intro/IntroScreen.ts b/js/intro/IntroScreen.ts
--- a/js/intro/IntroScreen.ts	(revision 68f366b3d1f9550b8c58c91dd3c699fdde8a94e2)
+++ b/js/intro/IntroScreen.ts	(date 1678313433728)
@@ -14,6 +14,7 @@
 import IntroScreenView from './view/IntroScreenView.js';
 import IntroScreenIcon from './view/IntroScreenIcon.js';
 import MySolarSystemStrings from '../MySolarSystemStrings.js';
+import BasicActionsKeyboardHelpSection from '../../../scenery-phet/js/keyboard/help/BasicActionsKeyboardHelpSection.js';
 
 class IntroScreen extends Screen<IntroModel, IntroScreenView> {
 
@@ -23,7 +24,10 @@
       homeScreenIcon: new IntroScreenIcon(),
       backgroundColorProperty: SolarSystemCommonColors.backgroundProperty,
       tandem: tandem,
-      name: MySolarSystemStrings.screen.introStringProperty
+      name: MySolarSystemStrings.screen.introStringProperty,
+      createKeyboardHelpNode: () => {
+        return new BasicActionsKeyboardHelpSection( { withCheckboxContent: true } );
+      }
     };
 
     super(

@Matthew-Moore240
Copy link

Here are the new keyboard shortcuts along with the order they are in. @zepumph

H2: Basic Actions
UL:
LI: Move to next item or group with Tab key.
LI: Move to previous item or group with Shift plus Tab key.
LI: Move between items in a group with Left and Right arrow keys or Up and Down arrow keys.
LI: Move draggable objects with Left and Right arrow keys or Up and Down arrow keys.
LI: Set values within pop-up keypad using number keys 0-9.
LI: Toggle checkboxes with Space key.
LI: Press buttons with Space key.
LI: Exit a dialog with Escape key.

@zepumph zepumph assigned zepumph and unassigned Matthew-Moore240 Mar 13, 2023
@zepumph zepumph changed the title Add keyboard help content Updates to BasicActionsKeyboardHelpSection keyboard section for basic alt-input Mar 14, 2023
@zepumph
Copy link
Member Author

zepumph commented Mar 15, 2023

Set values within pop-up keypad using number keys 0-9.

  • What if we got rid of the "pop-up". There are may keypads that are not popup, or at least not in the same way as a full, modal dialog.

@zepumph
Copy link
Member Author

zepumph commented Mar 15, 2023

  • It looks like we have lost the "reset all" row. Do you want that gone?

@zepumph
Copy link
Member Author

zepumph commented Mar 15, 2023

Perhaps phetsims/scenery-phet#800 is blocking My Solar System publication. Just noting here.

zepumph added a commit that referenced this issue Mar 15, 2023
zepumph added a commit to phetsims/scenery-phet that referenced this issue Mar 15, 2023
zepumph added a commit to phetsims/scenery-phet that referenced this issue Mar 15, 2023
zepumph added a commit to phetsims/scenery-phet that referenced this issue Mar 15, 2023
zepumph added a commit that referenced this issue Mar 15, 2023
@zepumph
Copy link
Member Author

zepumph commented Mar 15, 2023

Alright all done here. Please respond to the above two checkboxes

@zepumph
Copy link
Member Author

zepumph commented Mar 15, 2023

image

image

@zepumph zepumph removed their assignment Mar 15, 2023
@samreid
Copy link
Member

samreid commented Mar 15, 2023

API files are now showing moveDraggableObjectsStringProperty and setValuesInKeypadStringProperty. I'll commit the updated API files and reassign to @zepumph to review.

UPDATE: This impacted phetsims/calculus-grapher#225, so I'm adding a reference to it

@Matthew-Moore240
Copy link

I am totally okay with getting rid of the "pop-up" in the help text. I am not totally sure what you mean by the second checkbox.

@zepumph
Copy link
Member Author

zepumph commented Mar 15, 2023

Sorry to confuse! Your comment in #93 (comment) doesn't have a line for something already existing in the basic section:

Reset All with Alt+R

Currently that remains just above the esc to exit dialogs. Is that acceptable?

zepumph added a commit to phetsims/babel that referenced this issue Mar 15, 2023
zepumph added a commit to phetsims/scenery-phet that referenced this issue Mar 15, 2023
@zepumph
Copy link
Member Author

zepumph commented Mar 15, 2023

pop-up removed above. If the placement of the "reset all" line is acceptable. @Matthew-Moore240 please feel free to close this issue:

image

image

@zepumph zepumph removed their assignment Mar 15, 2023
@zepumph
Copy link
Member Author

zepumph commented Mar 17, 2023

From review today with @arouinfar:

Keep on using keypad in basic section

@zepumph
Copy link
Member Author

zepumph commented Mar 17, 2023

Here is what my working copy currently looks like:

image
image

(it's always a bit ironic that my picture of the PDOM is not accessible here in github). @arouinfar does that seem right to you? What order are you imagining?

@zepumph
Copy link
Member Author

zepumph commented Mar 17, 2023

Commits pushed

@arouinfar
Copy link
Contributor

@zepumph the keyboard help dialog looks so good, thank you! Section order and PDOM content also look reasonable to me, so I think we're good to close.

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