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

Better names for keyboard-help section classes? #714

Closed
pixelzoom opened this issue Dec 16, 2021 · 3 comments
Closed

Better names for keyboard-help section classes? #714

pixelzoom opened this issue Dec 16, 2021 · 3 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Dec 16, 2021

PhET convention is name things based on how they appear on the screen when possible. This makes it easier to locate code.

Would it be possible to rename the predefined keyboard-help sections so that their titles match their class names? That would make it a lot easier to find what I need, and to understand code that I'm not familiar with.

Some examples...

title class name better class name
Basic Actions GeneralKeyboardHelpSection BasicActionsKeyboardHelpSection
Slider Controls SliderKeyboardHelpSection SliderControlsKeyboardHelpSection
@jessegreenberg
Copy link
Contributor

Yes, this sounds good. The title for the general section used to be called "General Navigation" but it changed to "Basic Actions" and we didn't update the class name. Ill rename these.

jessegreenberg added a commit to phetsims/balloons-and-static-electricity that referenced this issue Dec 16, 2021
jessegreenberg added a commit to phetsims/fourier-making-waves that referenced this issue Dec 16, 2021
jessegreenberg added a commit to phetsims/ratio-and-proportion that referenced this issue Dec 16, 2021
jessegreenberg added a commit to phetsims/ratio-and-proportion that referenced this issue Dec 16, 2021
jessegreenberg added a commit to phetsims/fourier-making-waves that referenced this issue Dec 16, 2021
jessegreenberg added a commit to phetsims/resistance-in-a-wire that referenced this issue Dec 16, 2021
jessegreenberg added a commit to phetsims/plinko-probability that referenced this issue Dec 16, 2021
jessegreenberg added a commit that referenced this issue Dec 16, 2021
jessegreenberg added a commit to phetsims/ohms-law that referenced this issue Dec 16, 2021
@jessegreenberg
Copy link
Contributor

OK, I renamed

GeneralKeyboardHelpSection -> BasicActionsKeyboardHelpSection
SliderKeyboardHelpSection -> SliderControlsKeyboardHelpSection
SliderAndGeneralKeyboardHelpContent -> SliderControlsAndBasicActionsKeyboardHelpContent

The rest of the names seem appropriate to me, reassigning to @pixelzoom in case there is anything else.

pixelzoom added a commit to phetsims/geometric-optics that referenced this issue Dec 17, 2021
@pixelzoom
Copy link
Contributor Author

Thanks for the quick turnaround on this, it will definitely make things easier going forward.

It looks like you hadn't done a pull-all before renaming, because this broke Geometric Optics. Fixed in the above commit.

Everything else looks good, 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

3 participants