phetsims / concentration

"Concentration" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/concentration
GNU General Public License v3.0
1 stars 7 forks source link

add the ability to set the label on the shaker via query parameter #43

Closed jbphet closed 9 years ago

jbphet commented 9 years ago

@ariel-phet is giving a demo of PhET Interoperability at a conference next week, and has requested that the interoperable version of this simulation be modified such that the label on the shaker can be customized via query parameters. This was already done for the Beaker sim, but there is a desire to avoid that sim due to its limited exploration capabilities.

Also, the dev version that is published that includes this capability should be built with the phet-io brand.

The deadline for this is COB Monday Aug 17th. I've estimated that this will take around an hour to do, and @ariel-phet said to bail if it looks like it would take significantly longer.

pixelzoom commented 9 years ago

the label on the shaker can be customized via query parameters.

What does this mean? Does it mean the names of the solutes can be modified? If so...

@ariel-phet I recall discussing this "feature" with @jbphet when he was adding it to beaker. I objected strongly both to the feature itself, and the impact it was going to have on the code. So I am not at all excited to hear that this feature is going to be added to a sim that I have primary responsibility for, and which will also impact beers-law-lab. I would like to discuss (a) why the demo can't be done with beaker, and (b) if we must do this, how it can be done so that it has the least impact on concentration and beers-law-lab. Due to the short notice on this, I'm available to discuss today (Sunday, 8/17/15) if you'd like to call me.

pixelzoom commented 9 years ago

Another thought... If possible, do this in a branch as a "one off" for the conference, then abandon the branch. I would be OK with that solution.

ariel-phet commented 9 years ago

@pixelzoom yes, it can be totally be done as a one off, and discarded. I don't want to add it to the main simulation.

To better explain the impetus...I would prefer when demoing to show off PhET simulations, not the Beaker sim. The beaker sim could send the wrong message, since it is not a traditional PhET sim.

In addition, I believe for the demo we just plan to change the label on the Shaker through a query parameter and nothing else. Again, a total "one off" and nothing that should be in the current outfitted stable version.

pixelzoom commented 9 years ago

Great, then I don't need to be involved further. Thanks for the explanation.

jbphet commented 9 years ago

I'll put it on a branch, as suggested.

samreid commented 9 years ago

@pixelzoom said:

I objected strongly both to the feature itself, and the impact it was going to have on the code.

@ariel-phet responded:

I don't want to add it to the main simulation.

This was an essential feature for one of our collaborations, why do you think we won't need to implement it for future interoperability clients?

pixelzoom commented 9 years ago

The feature (as implemented in beaker) was to change the names of solutions. I objected to this because it was changing the names of standard solutions, without the ability to change their other properties. If we wanted to go down this path, I suggested a more robust feature: allowing the user to specify a custom set of solutions. This was not implemented.

As for the "change label on shaker" feature... The label on the shaker corresponds to the solution that is selected in the combo box. So I see no reason why the shaker label should be directly settable. If you want different labels to appear on the shaker, then (again) you probably want to provide a custom set of solutions.

samreid commented 9 years ago

Thanks for clarifying, working on this in the robust way you described seems nice. (Throwaway branch for now OK.)

jbphet commented 9 years ago

A version with the requested demo capability is now available here: http://www.colorado.edu/physics/phet/dev/html/concentration/1.2.0-together.7/concentration_en.html

To override the label, set concentration.concentrationScreen.shaker.labelOverride. For example, http://www.colorado.edu/physics/phet/dev/html/concentration/1.2.0-together.7/concentration_en.html?together.values={%22concentration.concentrationScreen.shaker.labelOverride%22:%22Stuff%22}

jbphet commented 9 years ago

Assigning to @ariel-phet to test and, if satisfactory, close.

pixelzoom commented 9 years ago

I was still confused about the "set label on shaker", so discussed with @jbphet. Summary: Setting the label via a query parameter effectively breaks the connection between the shaker label and the selected solution, so that changing the solution results in no change to the shaker label. I understand that this is for demo purposes only, but (a) I think that changing static text would have been easier to implement and explain, and (b) hopefully it won't be as confusing to the audience as it is to me. This feature is also contrary to design decisions made for this sim, so we'd be having a deeper discussion about this if it were being done in master.

ariel-phet commented 9 years ago

@pixelzoom - thanks for the insight. One thing we saw from showing demos to a company was changing the label on the shaker was a very "oooh" moment. Agreed that an even more compelling demo would be changing things in the drop down and keeping the connection with the shaker. However, for the types of demos I will be doing, this will suffice.

ariel-phet commented 9 years ago

Working for me. Closing