phetsims / sound-waves

"Sound Waves" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 1 forks source link

String keys do not follow PhET naming conventions #40

Open pixelzoom opened 1 year ago

pixelzoom commented 1 year ago

Noted while working on another cross-cutting issue...

Many of the string keys for this sim do not conform to PhET's naming conventions. Once the sim is published, PhET is effectively struck with those string keys. And that's a problem when a PhET-iO version is published, because the keys are used to name the string Properties that appear in the Studio tree.

Please see the item that begins with "Make sure the string keys are all perfect" in code-review-checklist.md. In general, keys should correspond as closely as possible to the English string values.

For example:

  "reflectionControlPanel.positionSlider": {
    "value": "Wall Position"
  },

should be:

  "reflectionControlPanel.wallPosition": {
    "value": "Wall Position"
  },

The nesting under reflectionControlPanel is also questionable and not typical, so I recommend simply:

  "wallPosition": {
    "value": "Wall Position"
  },

A prototype version of this sim was recently published. Hopefully these keys can still be changed.