-
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
instrument ComboBox better #405
Comments
I'm working on #396 and found that ComboBox should probably be using one FireListener per button rather than batching them all into a single listener. |
Not used in graphing quadratics or faradays-law. |
Hence the remaining work for this issue is:
|
In discussion with @chrisklus, we concluded that it seems best to schedule a PhET-iO design for ComboBox before deciding how to approach the remaining work for this issue. For instance, if we decide that PhET-iO clients should not be able to disable (make unpickable/transparent) individual elements in the popup box, we may prefer a single FireListener for the entire ComboBox. Conversely, if we keep customization of individual elements, it may make more sense for each of them to have their own FireListener. Perhaps next time we PhET-iO design a simulation with ComboBox it would be a good idea to discuss this issue. |
"meeting:phet-io" label is to make sure other team members are aware of the need for ComboBox PhET-iO design, probably the next time we have a PhET-iO design for a sim with a ComboBox. |
@Denz1994 and I worked on a commit to get ComboBox working for phetsims/scenery-phet#439, we are not planning on it as a long term feature, but just as something to get things working for now. |
Signed-off-by: Chris Malley <[email protected]>
FYI, things are pretty broken right now. f75f530 is passing Marking as high priority and "blocks-publication", because this is in no shape for production. |
I see that "Finish conversion to ES6" was check off in #405 (comment). Not even close, I'm going to uncheck it. There's no use of |
Signed-off-by: Chris Malley <[email protected]>
Today we discussed ComboBox PhET-iO API design:
Brainstorming:
We can write up a proposal for how to set initial or default values for when the sim is starting up. |
Re:
It's important to note that this operation is generally not specific to, or performed on, ComboBox. ComboBox displays ComboBoxItems, with include the visual representations (Nodes) that corresponds to values. In the case where those visual representations contain text, we want to change the text at the source - NOT after the Nodes have been assembled, and most definitely NOT after they have been provided to the ComboBox. |
We previously experimented with a PhET-iO mode where objects were customized as they were created, but it was ultimately removed it because it was incompatible with subtyping. We could open a new investigation for this, or look at using query parameters (or another upstream mechanism) to accomplish this. @jonathanolson previously promoted making our UI components more mutable, and we have done that in some cases, such as changing colors. @pixelzoom said often it is simpler to dispose an entire UI component and create a new one, but @jonathanolson pointed out that can damage the state of interaction with an in-use component.
@pixelzoom also pointed out that it may be possible to change text after UI component construction as long as we correctly set
One way to change the values at the source and have the changes reflected downstream would be to model them as axon Properties. This is what we typically do for other cases. |
But again, since I'm not sure everyone understands... Regardless of whether UI components are mutable, text strings should not be changed at the UI component. We use MVC, so in general there may be multiple views of one text string. So the correct place to make the change is at that one text string, not in each UI component. |
If we're going to rely on |
FYI, due to the "listbox" terminology that we decided on in #440, methods and event names in ComboBox and ComboBoxIO have been changed as follows:
|
4/5 of the main (non-brainstorm) requests in #405 (comment) are complete. I recommend to close this issue and open an issue for the remaining part. @pixelzoom or @zepumph anything else for this issue? |
I count 3/5 that are completed. These 2 are not done:
But I'm OK with closing this and tracking the remaining tasks in their respective issues. A general question... If issues like this one are the way that we're going to develop PhET-iO API requirements for common-code UI components, then how will we refer to this documentation in the future? Do I need to find this issue and then try to synthesize the decisions from the comments? Should the decisions made herein be documented in ComboBox.js? ComboBox.md? somewhere else? |
This issue is not ready to be closed. There are 2 TODO items that reference this issue in ComboBoxListBox - search for "TODO sun#405". They were preserved during (and pre-existed) the ComboBox refactor #430. |
Sounds great. Thanks all. |
While working on phetsims/tandem#62, we found that there was weird buggyness in how the buttonNode was being instrumented, but the tandem set to be "enabled: false". This was the only place in the project where tandem.enabled was being used.
We should make sure that we are getting the appropriate events/customizations fro ComboBox.
The text was updated successfully, but these errors were encountered: