phetsims / blackbody-spectrum

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

String keys need improvement #76

Closed chrisklus closed 5 years ago

chrisklus commented 5 years ago

From https://github.com/phetsims/blackbody-spectrum/issues/33.

It looks like keys from the older sim were ported over and have not been updated. According to the checklist, standard PhET convention is to not add a descriptor to the string key unless it would collide with another key, or if the value cannot really be used as the key.

IMO, it seems reasonable to me to tack on "Label" to the key when there are characters in the value that wouldn't make sense to include in the key (and the string is used as a label). My recommended changes:

verticalLabelSpectralRadiance -> spectralRadianceLabel horizontalLabelWavelength -> wavelengthLabel sirius -> siriusA lightbulb -> lightBulb, and value should be two words as "Light bulb" xrayLabel -> xRay ultravioletLabel -> ultraviolet visibleLabel -> visible infraredLabel -> infrared

Feel free to use your own judgement or consult with someone else, too.

chrisklus commented 5 years ago

I added one review comment related to this, but thought I should mention here to not forget to update the string var names to match the updated keys.

arnabp commented 5 years ago

The recommended suggestions all looked good and have been implemented, and all respective string variable names have also been updated, closing