phetsims / projectile-data-lab

"Projectile Data Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 0 forks source link

Simplify the implementation of keyboard help. #210

Closed pixelzoom closed 5 months ago

pixelzoom commented 5 months ago

For code review #32 ...

The only difference I see in keyboard help for the 4 screens is that the Sampling screen does not have the "Select a field" shortcut. So I expected to see 1 implementation of keyboard help where that shortcut is optional.

Instead, I see an overly complicated implementation with 7 classes. And the line that I expected to see optionally added is instead duplicated:

    const row = KeyboardHelpSectionRow.createKeysRow( [ TextKeyNode.altOrOption(), LetterKeyNode.l() ], ProjectileDataLabStrings.pressTheLaunchButtonStringProperty );

@samreid @matthew-blackman and I discussed this, and I will push a simplified implementation for their review.

pixelzoom commented 5 months ago

@matthew-blackman @samreid ready for your review. As we discussed, PDLKeyboardHelpNodeOptions was implemented so that interval tool shortcuts can be included for the Measures screen.

samreid commented 5 months ago

I confirmed this is working well and the implementation is much simpler, thanks @pixelzoom. Closing.