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

is ZoomButton over-instrumented? #573

Closed
pixelzoom opened this issue Feb 3, 2020 · 8 comments
Closed

is ZoomButton over-instrumented? #573

pixelzoom opened this issue Feb 3, 2020 · 8 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Feb 3, 2020

Related to https://github.com/phetsims/ph-scale/issues (ph-scale instrumentation).

ZoomButton is a common-code UI component. Here's what it looks like in ph-scale. There are 2 of them below the linear graph in the Macro screen:

screenshot_86

Here's the Studio tree structure for one of those ZoomButtons:

screenshot_87

This looks over-instrumented to me, perhaps vestigial from the "instrument everything" days of PhET-iO. Why are we instrumenting the parts of the icon (glassNode, signNode) separately? If instrumenting the icon is important, why isn't the icon (as a whole) instrumented?

I recommend that we remove instrumentation of the icon, and make the instrumentation similar to ResetAllButton and other push buttons, i.e.:

screenshot_88

(EDIT: Note that isFiringProperty is specific to ResetAllButton. According to the doc, it's "Commonly used to disable audio effects during reset".)

Assigning to PhET-iO designers to review. If someone from the PhET-iO dev team knows why the icon is instrumented this way, please chime in.

@pixelzoom pixelzoom transferred this issue from phetsims/ph-scale Feb 3, 2020
@samreid
Copy link
Member

samreid commented Feb 3, 2020

I agree, it seems like a symptom of the instrument everything approach, and those extraneous instrumentations should be removed.

@pixelzoom
Copy link
Contributor Author

@arouinfar or @kathy-phet if you agree, I'll proceed with removing instrumentation of the icon.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Feb 3, 2020

Not only is this over-instrumented, but the instrumentation is buggy, and was probably not tested. If I set glassNode.visibleProperty to false, it looks like the screenshot below. Only part of the magnifying glass disappears; the handle remains. Since this is not at all useful, I have to believe that it's buggy.

screenshot_89

@arouinfar
Copy link

It's definitely over instrumented @pixelzoom. I see no reason why the icon would be instrumented, rather than the button as a whole.

@arouinfar arouinfar assigned pixelzoom and unassigned arouinfar and kathy-phet Feb 3, 2020
@pixelzoom
Copy link
Contributor Author

Thanks @arouinfar. I'll proceed which changes.

pixelzoom added a commit to phetsims/circuit-construction-kit-ac that referenced this issue Feb 3, 2020
pixelzoom added a commit to phetsims/atomic-interactions that referenced this issue Feb 3, 2020
pixelzoom added a commit to phetsims/blackbody-spectrum that referenced this issue Feb 3, 2020
pixelzoom added a commit to phetsims/energy-skate-park that referenced this issue Feb 3, 2020
pixelzoom added a commit to phetsims/projectile-motion that referenced this issue Feb 3, 2020
pixelzoom added a commit to phetsims/states-of-matter that referenced this issue Feb 3, 2020
pixelzoom added a commit to phetsims/ph-scale-basics that referenced this issue Feb 3, 2020
@pixelzoom
Copy link
Contributor Author

pixelzoom commented Feb 3, 2020

Changes completed, and API files update in the above commits. Here's what the Studio tree looks like for ph-scale:

screenshot_90

@pixelzoom
Copy link
Contributor Author

@arouinfar could you please verify in ph-scale 1.4.0-dev.5 ?

In Studio, navigate to phScale.microScreen.view.graphNode.linearGraphNode.zoomButtonGroup.zoomInButton and inspect the structure. It should match what is shown in #573 (comment). If all looks well, please close.

@pixelzoom pixelzoom removed their assignment Feb 4, 2020
@arouinfar
Copy link

Looks wonderful @pixelzoom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants