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

Hotkey support for TimeControlNode #682

Open
pixelzoom opened this issue Jun 22, 2021 · 6 comments
Open

Hotkey support for TimeControlNode #682

pixelzoom opened this issue Jun 22, 2021 · 6 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Jun 22, 2021

TimeControlNode needs a comprehensive hotkey design. It has some partical support, but there has been no holistic design.

One of its subcomponent (PlayPauseButton) supports a hot key by default, while the other subcomponents (StepForwardButton, StepBackwardButton) do not support hot keys. PlayPauseButton hotkey is enabled by default, which feels odd. And MAL added its own StepForwardButton support, which should be in TimeControlNode, see #681.

This is not blocking for Fourier 1.0. I'm planning to disabled hotkey support for TimeControlNode's subcomponents.

@pixelzoom
Copy link
Contributor Author

Also consider adding common-code support for TimeControlNode keyboard help content. See phetsims/fourier-making-waves#93.

@pixelzoom
Copy link
Contributor Author

In phetsims/fourier-making-waves#93 (comment), I noted that Fourier will (someday) need hotkey support for TimeControlNode. (This will not be included in Fourier 1.0, see phetsims/fourier-making-waves#92 (comment).)

Discrete screen:
In #92, we'll eventually be adding hotkeys for TimeControlNode. It current looks like the screenshot below, and uses SliderAndGeneralKeyboardHelpContent.

  • Will there be common-code support for adding keyboard help content for TimeControlNode?
  • Or will clients have to add (and duplicate) strings?
  • What should the title be?

In phetsims/fourier-making-waves#93 (comment), @jessegreenberg replied:

The help content for the TimeControlNode hotkeys in MAL was
tempsnip

I think it would be great if we could have reusable strings for the TimeControlNode, but have been told we need unique strings for each sim. @arouinfar what do you think?

Even if we continue using unique strings we can make a common code component for the help content.

Can I still use the SliderAndGeneralKeyboardHelpContent

Probably not, I am guessing we will create a new Node that extends TwoColumnKeyboardHelpContent, but lets see what the requested look of this dialog is for this sim first.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Oct 4, 2022

Reviewing scenery-phet issues for Q4 2022 planning...

There has been no progress on this, assigned to @jessegreenberg with no response. We worked around this in Fourier, but it's needed in MOTHA. @kathy-phet please prioritize.

@zepumph
Copy link
Member

zepumph commented Oct 6, 2022

Subset of phetsims/scenery#1298

@jessegreenberg
Copy link
Contributor

Reviewing this issue as of 2/23/24 -

  • TimeControlNode has support for a global hotkey to play/pause through PlayStopButton.
  • There is now a TimeControlKeyboardHelpSection in scenery-phet with a heading and row for this command.
  • We should design hot keys for TimeControlNode in general to determine if other keys should be added (such as for step forward/backward). Then we can update TimeControlKeyboardHelpSection.

@jessegreenberg
Copy link
Contributor

We visited this during a prioritization meeting and want to have an approach for 'hotkey registry' working before we add more hotkeys to common code components like this.

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

6 participants