Skip to content
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

Unable to hide individual temp units #345

Closed
KatieWoe opened this issue Aug 11, 2023 · 3 comments
Closed

Unable to hide individual temp units #345

KatieWoe opened this issue Aug 11, 2023 · 3 comments
Assignees
Labels
dev:phet-io type:bug Something isn't working

Comments

@KatieWoe
Copy link
Contributor

Test device
Samsung
Operating System
Win 11
Browser
Chrome
Problem description
For phetsims/qa#970
The instructions in the examples doc mention hiding different temp units and give the following elements for the first two screens. None seem to exist in either Featured or All elements.

greenhouseEffect.wavesScreen.view.observationWindow.surfaceThermometer.comboBox.listBox.celsiusItem.visibleProperty
greenhouseEffect.wavesScreen.view.observationWindow.surfaceThermometer.comboBox.listBox.fahrenheitItem.visibleProperty
greenhouseEffect.wavesScreen.view.observationWindow.surfaceThermometer.comboBox.listBox.kelvinItem.visibleProperty
greenhouseEffect.photonsScreen.view.observationWindow.surfaceThermometer.comboBox.listBox.celsiusItem.visibleProperty
greenhouseEffect.photonsScreen.view.observationWindow.surfaceThermometer.comboBox.listBox.fahrenheitItem.visibleProperty
greenhouseEffect.photonsScreen.view.observationWindow.surfaceThermometer.comboBox.listBox.kelvinItem.visibleProperty

@KatieWoe KatieWoe added the type:bug Something isn't working label Aug 11, 2023
@arouinfar
Copy link
Contributor

How strange. Good find @KatieWoe.

In #341 I requested that view.observationWindow.surfaceThermometer.comboBox.item be uninstrumented because it only contained instrumented text. I wonder if @jbphet accidentally also got rid of its sibling comboBox.listBox while he was in there.

@jbphet can you take a look?

@jbphet
Copy link
Contributor

jbphet commented Aug 18, 2023

I think I've got it sorted out. The easiest way to remove 'items' is to not add a tandem to the individual items, and that's what I did, but it also removed the items from the list box. I reverted that part and removed the tandems from the individual number displays and value patterns, and that seems to have done the trick.

@arouinfar - Please double check the behavior on main. It's a little weird because it's possible to hide the item that is currently selected from the list box, and the selection doesn't change, but it's gone from pop-up list box. I guess that's okay, but thought I should have you confirm.

@jbphet jbphet assigned arouinfar and unassigned jbphet Aug 18, 2023
@arouinfar
Copy link
Contributor

@jbphet the behavior on main looks good to me. Closing.

It's a little weird because it's possible to hide the item that is currently selected from the list box, and the selection doesn't change, but it's gone from pop-up list box. I guess that's okay, but thought I should have you confirm.

This is to be expected and is not unique to ListBox (can happen with radio buttons too). This is a case where people can do strange things with PhET-iO, but we don't expect them to. The sim doesn't crash in this scenario, and users can still interact with the ListBox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev:phet-io type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants