-
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
ComboBox PhET-iO design pattern #587
Comments
@kathy-phet and I talked a bit more about this today, and Addressing the checkboxes in #587 (comment) should be the priority for this issue. |
@zepumph @samreid @chrisklus this issue needs to be addressed before delivering a dev version of ph-scale to the client. |
Currently this is only supported for default enabledProperties. In all three sims above it looks like comboboxes are not being passed a premade enabledProperty. So this will be good. I don't want to build out any more logic in ComboBox for this because it will be fixed when we use
I would be simple enough to link the pickability and opacity of the listbox to the value of the property for the Combobox, but I would first want to make sure that this wasn't interferring with any patterns that may already be in place for ComboBox. I don't know much about |
All the checkboxes have been implemented above. All that remains is the above discussion point about linking opacity and pickability of the listbox to the combo box. |
@arouinfar please review and remove the blocking label if all looks as you desire. |
Thanks @zepumph! I noticed that
That seems reasonable to me. I'll make a note in case I run into a sim in the future where
Good to know. I think this may take may merit a bigger discussion, but it's not pressing for any of the PhET-iO dev deliveries. |
combo box button visibleProperty phetioFeatured false bug should be fixed above. In 217dbaa I synced opacity and pickable of the listbox to the value of the ComboBox. I think my preference from here (if this is what we like and want to go with), is to make the listbox pickable/opactity Properties |
list box has read-only opacity and pickle Properties above. @pixelzoom can you please review 217dbaa That is one-directional, but, when coupled with the fact that on the PhET-iO API the list box's Properties are read-only, I think that it is sufficient. |
I verified that I verified that changing Changing |
The behavior is definitely a bit funky. Now that |
@zepumph sounds like it would be OK to remove the linkage for |
That is a very great call. Thanks you two! |
Several sims currently undergoing PhET-iO instrumentation contain ComboBox, see:
In design reviews @kathy-phet and I have discussed the general pattern what we would like featured in a ComboBox. If any of these requests are better handled on a sim-by-sim basis in the overrides, please let me know.
We would like the following to be phetioFeatured: true
comboBox.displayOnlyProperty
comboBox.enabledProperty
comboBox.visibleProperty
comboBox.listBox.*.visibleProperty
If possible, make these phetioFeatured: false
comboBox.button.enabledProperty
comboBox.button.visibleProperty
We also have some concerns regarding the ListBox. It seems like the
listBox.opacityProperty
andlistBox.pickableProperty
should be phetioReadOnly: true. However, they don't appear to be listening to the parentcomboBox.opacityProperty
andcomboBox.pickableProperty
, so it's possible for the ComboBox and ListBox to have different opacities. Similarly, it's possible to make the ComboBox unpickable, but the ListBox is still pickable. Both of these scenarios seem odd and undesirable to us.comboBox.listBox.visibleProperty
should bephetioReadOnly: true
since the ListBox should only appear through interaction with the button.The text was updated successfully, but these errors were encountered: