Closed KatieWoe closed 3 years ago
This is in the Client Requests guide. I'll change the title of this issue.
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?
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.
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.
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.
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.
Done in the above commit, back to @pixelzoom.
@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.
Looks good to me.
@KatieWoe please review in master. Please close if it's OK.
Looks good in master
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?