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

Elements to make phetioReadOnly: true #344

Closed
6 tasks done
arouinfar opened this issue Jul 28, 2023 · 2 comments
Closed
6 tasks done

Elements to make phetioReadOnly: true #344

arouinfar opened this issue Jul 28, 2023 · 2 comments

Comments

@arouinfar
Copy link

arouinfar commented Jul 28, 2023

For #323

@pixelzoom I've identified a few elements that should be phetioReadOnly: true.

There is no need for the client to control these Properties:

  • model.bunnyCollection.deadBunnies.countsProperty
  • model.bunnyCollection.liveBunnies.countsProperty
  • model.bunnyCollection.recessiveMutants.countsProperty
  • model.graphs.proportionsModel.currentStartCountsProperty
  • view.graphs.populationNode.populationGraphNode.generationScroller.*Button.enabledProperty

In the Pedigree Graph, it's possible to hide the allele checkboxes, but leave behind the legend information, which seems odd.
image

  • view.graphs.pedigreeNode.allelesPanel.*Row.checkbox.visibleProperty
@pixelzoom
Copy link
Contributor

pixelzoom commented Jul 28, 2023

Done in the above commits. This was an API change, and required new migration rules.

For view.graphs.pedigreeNode.allelesPanel.*Row.checkbox.visibleProperty, I can think of no purpose to have this element if it's read-only; it will always be true. So rather than make it read-only, I unistrumented checkbox.visibleProperty. @arouinfar let me know if you had a purpose for it, and I can certainly make it read-only.

@arouinfar please review. Close OK.

@arouinfar
Copy link
Author

I unistrumented checkbox.visibleProperty.

Good call, thanks @pixelzoom. The changes all look good, closing.

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

2 participants