phetsims / unit-rates

"Unit Rates" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 2 forks source link

Reset All results in 'random selection' of item #179

Closed pixelzoom closed 7 years ago

pixelzoom commented 7 years ago

Code review #159.

@Denz1994 thought it was a bit confusing that the Reset All button chooses a random fruit (as is done at startup).

To reproduce:

  1. start the sim
  2. go to Shopping screen
  3. press Reset All button; the selected fruit is randomly changed
  4. press Reset All button again; the selected fruit is randomly changed again

@arouinfar Let me know if you want to change the behavior. And this may be something to watch for in interviews.

phet-steele commented 7 years ago

@arouinfar my very quick two cents (maybe one cent because it's so quick?).

Have the sim startup with a random fruit? Sure. Have subsequent Reset Alls change what fruit you are playing with? I'd say a hard no on that.

pixelzoom commented 7 years ago

@phet-steele Are you also implying that if we're playing with Carrots (the Vegetable category), that we shouldn't reset to Fruit?

pixelzoom commented 7 years ago

@arouinfar My 2 cents... The screen should be entirely reset, typical of the behavior for all sims. But each category should be reset to whatever item was randomly selected at startup.

arouinfar commented 7 years ago

@Denz1994 and @phet-steele have made some good points. I think randomization on startup is sufficient to address the goal of randomization -- a classroom full of students will work on a variety of fruits, by default. I don't see any need for Reset All to also randomize the fruit, and it does feel a bit weird.

Have subsequent Reset Alls change what fruit you are playing with? I'd say a hard no on that.

I'm a little hesitant about this suggestion @phet-steele. It also diverges from the behavior in other sims. For example, in Concentration, the solute goes back to the default (Drink Mix) on Reset All.

@arouinfar My 2 cents... The screen should be entirely reset, typical of the behavior for all sims. But each category should be reset to whatever item was randomly selected at startup.

I agree @pixelzoom. I don't think we need to wait on interviews -- please go ahead and make this change.

phet-steele commented 7 years ago

Have subsequent Reset Alls change what fruit you are playing with? I'd say a hard no on that.

Are you also implying that if we're playing with Carrots (the Vegetable category), that we shouldn't reset to Fruit?

I'm a little hesitant about this suggestion @phet-steele. It also diverges from the behavior in other sims. For example, in Concentration, the solute goes back to the default (Drink Mix) on Reset All.

I was going off of the procedure @pixelzoom described in https://github.com/phetsims/unit-rates/issues/179#issue-212829404, in which case Reset All should NOT be changing what you are playing with. Incidently, what @pixelzoom then wrote...

The screen should be entirely reset, typical of the behavior for all sims. But each category should be reset to whatever item was randomly selected at startup.

... is exactly what I was just about to type. So it seems we are all in agreement!

pixelzoom commented 7 years ago

@phet-steele please verify in master.

To verify:

  1. start sim
  2. go to Shopping screen
  3. for each category (fruit, vegetable, candy): • select the category • note the initial item selection in the combo box • changing the selection in the combo box
  4. press Reset All button
  5. for each category (fruit, vegetable, candy): • select the category • verify that the item selected in the combo box matches the initial selection in step 3.
phet-steele commented 7 years ago

Works beautifully, thanks @pixelzoom! Everything behaves as described above.

pixelzoom commented 7 years ago

Thanks @Denz1994 for suggesting this change. It feels much better.