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

Consider Step Forward hotkey? #336

Closed
terracoda opened this issue May 5, 2020 · 27 comments
Closed

Consider Step Forward hotkey? #336

terracoda opened this issue May 5, 2020 · 27 comments

Comments

@terracoda
Copy link

The Pause/Play hotkey worked great, and one comment was it would be good to have one for Step Forward, too.

I am wondering if we should consider this for future releases, and for the Timing Control widget, in general.

@terracoda
Copy link
Author

Decision: Let's try ALT + L for Step Forward.
@terracoda to update Keyboard dialog content.

@jessegreenberg
Copy link
Contributor

@terracoda said

JUST had a thought that for non-visual exploration bigger steps would be way more useful. @jessegreenberg would it be possible to make ALT + L do big steps instead of little ones? I'm thinking 3 visual steps for photon to reach molecule:

  • Step one: leaves light source
  • Step two: halfway to molecule
  • Step three: at absorption point of molecule

@jessegreenberg
Copy link
Contributor

The problem with such large steps is that there is a small distance around the molecule to query for absorption. The center of the molecule needs to enter this rectangle to test for absorption
image

If the time step is too large, it would be possible for the photon to step completely over the molecule and never be absorbed.

@jessegreenberg
Copy link
Contributor

The above commit adds the hot key to molecules and light with the same behavior as the step forward button.

@jessegreenberg
Copy link
Contributor

I added a query parameter keyboardTimeStep (in seconds) that lets you change the time step for "Alt + L" key press. The default value is 0.0167.

https://phet-dev.colorado.edu/html/molecules-and-light/1.5.0-dev.49/phet/molecules-and-light_en_phet.html?keyboardTimeStep=0.0167.

@terracoda @Matthew-Moore240 can you try it out to see if we should explore this further?

@jessegreenberg
Copy link
Contributor

Over slack @terracoda said

Are steps measured in pixels only? Is there no way to make that fourth step always hits the absorption point?

This would be much more complicated, and currently isn't supported by the model. The model steps forward in time but this would involve moving the photon to a new position independent of time.

@terracoda
Copy link
Author

@jessegreenberg 0.0835 seems to work really well. It gives about 5 steps instead of 25 or 26.

@terracoda
Copy link
Author

I'd need to review the description and sound a little more carefully.

@terracoda
Copy link
Author

terracoda commented May 6, 2020

@jbphet and @Ashton-Morris could you have a listen to the MAL with this keyboard Time Step parameter set to 0.0835

https://phet-dev.colorado.edu/html/molecules-and-light/1.5.0-dev.49/phet/molecules-and-light_en_phet.html?keyboardTimeStep=0.0835

Then do the following:

  1. Turn photons on
  2. Use ALT + K to Pause action
  3. Use ALT + L to step forward action in big (bigger) steps

I think it sounds really good, but it would be nice for you sound experts to have a combined look/listen.

@terracoda terracoda assigned Ashton-Morris and jbphet and unassigned terracoda May 6, 2020
@terracoda
Copy link
Author

In my opinion the descriptions and sounds work well with the bigger step size.

And for the record, the proposition in this issue is to make the ALT + L hotkey use the bigger step, and not change the default step size that happens with the Step Forward button.

@terracoda
Copy link
Author

The two hotkeys (ALT + K and ALT + L) work really nicely together. I can leave the my focus on one of the radio groups and then pause and play at will and choose to step forward at will.

I'm finding the bigger steps really useful, so once sound timing is verified I think we should add the ALT + L hotkey.

@terracoda terracoda mentioned this issue May 6, 2020
91 tasks
@jbphet jbphet removed their assignment May 8, 2020
@terracoda
Copy link
Author

@jessegreenberg, if 0.0666 is more reliable as you say in #336 (comment), I am good with that timing.

0.0666 still results in about 5 or 6 bigger steps rather than the 25 or 26 little by little steps one gets by default with the Step Forward button.

@terracoda
Copy link
Author

As for if the sound should fire repeatedly when holding down Enter (or ALT + L). I think some regular repetition of the sound when a Step Forward interaction is happening benefits non-visual users because we do not describe the photons progression across the screen.

@terracoda
Copy link
Author

terracoda commented May 8, 2020

@jessegreenberg, both @Matthew-Moore240 and I agree the "bigger" Step Forward step with ALT + L is really nice. Assigning to you for implementation.

I am not sure if it is best to continue the discussion on Sound here or in a new issue?

Please create a new issue if that makes sense, apologies for complicating this issue :-)

@terracoda
Copy link
Author

@jessegreenberg, again, for the sound issue, as you said the same repeat sound happens when holding down any button (Including the very strong sounding Reset All button).

What are our options for optimization here, and I am thinking this kind of optimization is a general one, one that would be what we want for all sims, not just MAL.

@terracoda
Copy link
Author

terracoda commented May 8, 2020

@jbphet, @emily-phet, and @Ashton-Morris does this issue warrant a sound meeting discussion?
The issue is about repeat firings of sound when a button is held down with the Enter Key.

I have a feeling this has come up before?

@jessegreenberg
Copy link
Contributor

jessegreenberg commented May 8, 2020

if 0.0666 is more reliable as you say in #336 (comment), I am good with that timing.

OK sounds good, thanks!

would probably be good for you try adding the sound, since we need to get all developers a bit more familiar with it.

Cool, sounds great! Ill give it a try, and @terracoda ill open a new issue to track this.

What are our options for optimization here, and I am thinking this kind of optimization is a general one, one that would be what we want for all sims, not just MAL.

Hmm, I can think of three options at the moment but there may be more.

  • Limit button sounds to only play once every X ms.
  • Prevent all button sounds if we get click events faster then once every X ms.
  • Limit buttons to only be able to fire once every X ms with a keyboard.

@jessegreenberg
Copy link
Contributor

The time step for the global hotkey has been set.

does this issue warrant a sound meeting discussion?

I would be happy to join too, this issue involves both alternative input and sound.

@emily-phet
Copy link

@terracoda looped me in re repeating button sound.

I doubt there is a general solution for this - "button" is a big category within PhET and depending on the context it may make sense to hear repeating sounds or to hear only one etc.

If you all think this is a major issue for MAL, I suggest it be handled as a sim specific one. If it's a minor thing, I suggest leaving it as is to not delay publication.

Unfortunately, I don't have the bandwidth to participate in design solutions, but if you all decide to address this for MAL, please loop @jbphet and @Ashton-Morris in for at least one quick conversation.

@emily-phet emily-phet removed their assignment May 9, 2020
@jbphet
Copy link
Contributor

jbphet commented May 11, 2020

@terracoda said:

I think some regular repetition of the sound when a Step Forward interaction is happening benefits non-visual users because we do not describe the photons progression across the screen.

...and @emily-phet said:

If it's a minor thing, I suggest leaving it as is to not delay publication.

Even though I brought it up, my vote now would be that, given the input above, we leave it as is and revisit if it ever turns out to be a problem during interviews or if we get any complaints from users.

@jbphet jbphet removed their assignment May 11, 2020
@Ashton-Morris
Copy link
Contributor

@jbphet and @Ashton-Morris could you have a listen to the MAL with this keyboard Time Step parameter set to 0.0835

https://phet-dev.colorado.edu/html/molecules-and-light/1.5.0-dev.49/phet/molecules-and-light_en_phet.html?keyboardTimeStep=0.0835

Then do the following:

  1. Turn photons on
  2. Use ALT + K to Pause action
  3. Use ALT + L to step forward action in big (bigger) steps

I think it sounds really good, but it would be nice for you sound experts to have a combined look/listen.

I think it sounds really good. I would be open to a short sound related meeting to address what you are describing above

@terracoda
Copy link
Author

@Ashton-Morris, glad you agree.
I think we nailed it. Please see issue #339 which I just closed.

We are going to wait on the "repeating sound" part of the issue.

I think this issue is all verified, so 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

6 participants