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

Naming convention not followed in PDLColors.ts #196

Closed pixelzoom closed 6 months ago

pixelzoom commented 6 months ago

For code review #32 ...

For color profiles, there is a naming convention that is not being followed. If blahProperty is the field name, then the argument to colorName argument to ProfileColorProperty should be 'blah'.

In PDLColors.ts there are many names that do not follow this convention. For example:

  panelColorProperty: new ProfileColorProperty( projectileDataLab, 'panelFill', {
    default: 'rgb(243,243,243)'
  } ),

There is no correspondence between panelColorProperty and 'panelFill'. So the names should be either panelFillProperty and panelFill, or panelColorProperty and panelColor.

Creating a new lint rule for this might be good.

matthew-blackman commented 6 months ago

Thanks for the review @pixelzoom. This has been updated in the commit. A lint rule would not be a bad thing to have here. @pixelzoom can you provide feedback on the way we're using the mysteryLauncherFillColorProperties array, and whether this can be closed?

pixelzoom commented 6 months ago

@pixelzoom can you provide feedback on the way we're using the mysteryLauncherFillColorProperties array, and whether this can be closed?

@matthew-blackman and I worked on this in https://github.com/phetsims/projectile-data-lab/commit/ecf5b6bec262b7ee64e073ae26cbcbfcf17e0e78. Closing.