-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "display mode" to ComboBox #451
Comments
This will involve instrumenting ComboBoxButton, which is currently not implemented. |
Signed-off-by: Chris Malley <[email protected]>
Signed-off-by: Chris Malley <[email protected]>
Implemented in the above commits. While implementing this, I decided that this.displayOnlyProperty = new BooleanProperty( false, {
tandem: options.tandem.createTandem( 'displayOnlyProperty' ),
phetioDocumentation: 'disables interaction with the ComboBox and makes it appear like value display'
} ); Here's how it looks in Studio with Beer's Law Lab. First with Here's how it looks where set to @ariel-phet please assigning someone to review. |
Signed-off-by: Chris Malley <[email protected]>
phetioDocumentation was revised to: phetioDocumentation: 'disables interaction with the ComboBox button ' +
'and makes it appear like a display that shows the current selection' |
Signed-off-by: Chris Malley <[email protected]>
@chrisklus and I reviewed and it looks great, we made minor modifications above. Back to @pixelzoom to sign off on the minor changes. Close if all is well. |
👍 @samreid FYI, it looks like a bunch of commit above are for some other issue with title "Remove whitespace from tandem strings". Up to you whether to tag those commits with the correct issue number. Closing. |
Reopening. I think this Property may be misplaced. It should probably be a Property of ComboBox, not ComboBoxButton. And in addition to changing the look of ComboBoxButton, it should hide the listBox. @samreid your opinion? |
I agree with your recommendations. @zepumph does that sound right to you? I recall we discussed whether this property should be in ComboBoxButton or ComboBox, but I don't recall our reasoning. |
Here's how it looks in Studio with Beer's Law Lab when set to Here's how it looks where set to |
Everything looks good to me. I like putting it directly on the ComboBox. I wasn't quite sure why we aren't resetting this property on reset? It makes sense to me why we may think that it is nice to not reset so that a client doesn't have to invoke a call again on reset to turn the combo box to display mode. I am worried that this is a new convention, that we don't do anywhere else in the project. Currently our "solution" is explained at the bottom of the wrapper index:
While this isn't the greatest solution, it is general. I would recommend making |
Zoom discussion with @zepumph and @samreid:
There's no advantage to wiring This is the same policy that we've had for many years for (e.g.) customizing text elements - they do not reset on Reset All. So in general, Properties that exist solely for PhET-iO customization should not be wired into Reset All. Assigning to @zepumph to make a note about this in PhET-iO Instrumentation doc. Then please close this issue. |
1/17/19 phet-io meeting, requested by @kathy-phet:
Add
{BooleanProperty} singleItemDisplayProperty
, defaultfalse
. Hides the arrow and vertical separator on the ComboBoxButton, and set'spickable: false
on the ComboBox.The text was updated successfully, but these errors were encountered: