phetsims / mean-share-and-balance

"Mean: Share and Balance" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 1 forks source link

Rename controls.numberSpinner to have more context #255

Closed marlitas closed 3 months ago

marlitas commented 4 months ago

numberOfCupsSpinner

marlitas commented 4 months ago

The spinners have been renamed in all 4 screens. I cleaned up some of the type definitions to centralize where numberSpinnerOptions are being defined and get some more type safety around providing tandems.

Over to @amanda-phet and @jbphet for review.

jbphet commented 4 months ago

Looks good to me.

amanda-phet commented 4 months ago

I was expecting numberOfPlatesSpinner to say numberOfPeopleSpinner. And I'm guessing the reason you chose plates is that all of the other things have plate in the name.

@arouinfar we renamed these based on your suggestion (thanks!) and I'm curious what you'd want to see in this scenario given the naming of things in the code and the naming used visibly in the sim.

arouinfar commented 3 months ago

I don't think I've run into a case quite like this. Normally, I would advocate for the phetioID to match up with the string used in the view, but I see that "plates" is pretty pervasive throughout the tree and is a more general term. Autoselect also makes it really easy to find numberOfPlatesSpinner in the tree, and I think clients will pick up on it easily.

I see two options:

  1. Make no changes to the tandem names, but be sure to include something in examples.md that highlights numberOfPlatesSpinner, numberOfPlatesProperty, and/or maxPlatesProperty to bridge the language between "people" and "plates".
  2. Change the string in the sim from "Number of People" to "Number of Plates". This may not be an acceptable design choice as "people" are more fun than "plates".
amanda-phet commented 3 months ago

We agreed that it's acceptable to name this numberOfPlates even though the text on the screen says numberOfPeople. It's clear in the context of the tree what we are referring to.