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

Consider renaming PDLPanelSection subclasses. #211

Closed pixelzoom closed 5 months ago

pixelzoom commented 5 months ago

For code review #32 ...

The names of SectionLauncherConfiguration, SectionMysteryLauncher, and SectionProjectileType are a little odd. They all extend PDLPanelSection, so they would typically be named SomethingSection or SomethingPanelSection.

Use sites are also a little odd, where const names do not match class names (same words, but different order). E.g.:

const launcherConfigurationSection = new SectionLauncherConfiguration(...

Consider renaming to LauncherConfigurationSection, etc. where the word "Section" is last. This would match the superclass name and the const instance names. E.g.:

export default class LauncherConfigurationSection extends PDLPanelSection { ...

const launcherConfigurationSection = new LauncherConfigurationSection( ...
matthew-blackman commented 5 months ago

This was addressed in commit https://github.com/phetsims/projectile-data-lab/commit/d9ed4efe64718c604f2dcc39e2df08acc99ea6bb. Not sure why it's not linking over here. Thanks for the suggestion @pixelzoom, this looks much cleaner. Changes were straightforward. Closing.