Closed zepumph closed 4 years ago
I implemented this above. During it I found two things that I would still like to clean up before review:
rename getCurrentSolute
because it returns a string.
120 char clip on MolarityModel
that is a bit strange.
Alright, cleanup is done now. @twant please review. Especially about the placement of these strings in the model, and if you think the new StringCasingPair data structure makes sense (and has a good name).
Thanks!
@zepumph I like this a lot, particularly adding the lowercase names and colors to the model. StringCasingPair is nice, and I want to look at ways this could be used in other places where we have capitalized and lowercase string versions. I changed a few string names in this in a commit related to #172 to make sure we're consistent in identifying strings as lowercase or capitalized in the variable names (just as a flag that two versions exist, and for consistency). Thanks for doing this! Closing.
From https://github.com/phetsims/molarity/issues/171
It feels much more robust to store color strings in the model, rather than have a switch case in a describer. I also feel the same way about the lowercase versions of the solute names.
This feels better to me for a few reasons:
MolarityModel.solutes
is declared was the only spot where solute-specific data was needed to be given.