phetsims / molecule-polarity

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

Should Client Requests guide mention electronegativityProperty? #125

Closed KatieWoe closed 3 years ago

KatieWoe commented 3 years ago

For https://github.com/phetsims/qa/issues/680. In the client guide, there is a section that instructs the client to change an atoms electronegativity using electronegativityProperty and it links to those properties. However, these properties don't seem to allow user control in studio. Should they still be mentioned?

property electronegative
pixelzoom commented 3 years ago

This is in the Client Requests guide. I'll change the title of this issue.

pixelzoom commented 3 years ago

In https://github.com/phetsims/molecule-polarity/issues/94, @arouinfar requested that the electronegativity sliders snap to 0.2 intervals when released. Studio's slider has no support for this type of snapping - they can only be continuous. So electronegativityProperty has had its slider removed from Studio by specifying phetioStudioControl: false in Atom.js:

    // @public
    this.electronegativityProperty = new NumberProperty( options.electronegativity, {
      range: MPConstants.ELECTRONEGATIVITY_RANGE,
      tandem: options.tandem.createTandem( 'electronegativityProperty' ),
      phetioStudioControl: false // because not continuous, see https://github.com/phetsims/molecule-polarity/issues/94
    } );

Options, from least-to-most cost:

(1) Leave it as is. No control for electronegativityProperty in Studio, and fix the Client Requests guide.

(2) Remove phetioStudioControl: false and let the client set electronegativityProperty to continuous values in the range [2,4]. Clients can do this through the PhET-iO API, so maybe this would be OK.

(3) Add validValues option to electronegativityProperty, to enumerate the 11 possible values at 0.2 intervals in the range [2,4]. As with all NumberProperty instances, this will result in a radio button in Studio for each possible value, NOT a slider.

@arouinfar your preference?

pixelzoom commented 3 years ago

Here's what option (3) would look like in Studio. Not very pretty, but it does the job.

I should also note that option (3) is going to involve making the model aware of the view snap internal. Not a huge amount of work (probably < 1 hour) but definitely more than the other options.

screenshot_1121
pixelzoom commented 3 years ago

My recommendation is option (2).

Here's option (2) in Studio. electronegativityProperty gets a continuous slider. Yes, the instructional designer can set values that are not 0.2 intervals. But so can a programmer using the PhET-iO API. And if they want a 0.2 interval, they can use the slider in the sim -- and note that in the Client Requests guide.

screenshot_1122
pixelzoom commented 3 years ago

Raising priority to high. This is a dev test, the dev testing is wrapping up, and it's important to create the release branch ASAP after creating the dev test.

arouinfar commented 3 years ago

I think the issue here is a misinterpretation. The client-requests doc tells people to:

Set the electronegativity with the sliders in the simulation in PhET-iO Studio or via the corresponding electronegativityProperty.

Looks this is interpreted as using the slider in the Studio interface, but its intent is to tell folks to use the slider in the sim itself. I'll drop the "in PhET-iO Studio" so it simply reads:

Set the electronegativity with the sliders in the simulation or via the corresponding electronegativityProperty.

arouinfar commented 3 years ago

Done in the above commit, back to @pixelzoom.

arouinfar commented 3 years ago

@KatieWoe we often remove sliders from the Studio interface because they cannot snap in intervals as is done in the simulation. The property is not read-only so a client can still set the value of the electronegativityProperty using an API, which is why it's mentioned in the client requests.

pixelzoom commented 3 years ago

Looks good to me.

@KatieWoe please review in master. Please close if it's OK.

KatieWoe commented 3 years ago

Looks good in master