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

Improve the "Node.isSomething" mixin pattern #1653

Closed
samreid opened this issue Sep 3, 2024 · 5 comments
Closed

Improve the "Node.isSomething" mixin pattern #1653

samreid opened this issue Sep 3, 2024 · 5 comments

Comments

@samreid
Copy link
Member

samreid commented Sep 3, 2024

Commit on the way for InteractiveHighlighting, we can do more like this for voicing, and reading block.

@zepumph
Copy link
Member

zepumph commented Sep 3, 2024

From work in phetsims/scenery-phet#869

samreid added a commit to phetsims/scenery-phet that referenced this issue Sep 3, 2024
samreid added a commit to phetsims/axon that referenced this issue Sep 3, 2024
samreid added a commit that referenced this issue Sep 3, 2024
samreid added a commit to phetsims/scenery-phet that referenced this issue Sep 3, 2024
zepumph added a commit to phetsims/friction that referenced this issue Sep 12, 2024
zepumph added a commit that referenced this issue Sep 12, 2024
@zepumph
Copy link
Member

zepumph commented Sep 12, 2024

Ok. I committed the rest of these. So now we prefer these standalone functions instead of the boolean getter. I went one step further and added underscores to the getters.

@jessegreenberg can you please spot check this, while noting the new pattern and how it removes the need to type case things as the mixin types. Please also double check the one TODO I added.

@zepumph
Copy link
Member

zepumph commented Sep 12, 2024

A couple more coming in that I missed, one second.

zepumph added a commit that referenced this issue Sep 12, 2024
zepumph added a commit to phetsims/scenery-phet that referenced this issue Sep 12, 2024
@zepumph
Copy link
Member

zepumph commented Sep 12, 2024

ok done.

@jessegreenberg
Copy link
Contributor

I reviewed the commits, looks like a nice improvement to me and it matches the pattern used by layout traits.

A TODO was added for this issue, I confirmed it was correct and tested the behavior in quadrilateral.

Thanks!

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

3 participants