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

Use PhET convention for naming Properties related to visibility. #59

Closed
pixelzoom opened this issue Jun 28, 2022 · 3 comments
Closed

Use PhET convention for naming Properties related to visibility. #59

pixelzoom opened this issue Jun 28, 2022 · 3 comments
Assignees

Comments

@pixelzoom
Copy link
Contributor

For code review #41 ...

In IntroModel.ts:

    this.isShowingPredictMeanProperty = new BooleanProperty( false, {
      tandem: options.tandem.createTandem( 'isShowingPredictMeanProperty' )
    } );
    this.isShowingMeanProperty = new BooleanProperty( false, {
      tandem: options.tandem.createTandem( 'isShowingMeanProperty' )
    } );
    this.isShowingTickMarksProperty = new BooleanProperty( false, {
      tandem: options.tandem.createTandem( 'isShowingTickMarksProperty' )
    } );

The "isShowing" prefix here does not match PhET/PhET-iO naming conventions.
For Properties that control visibility, the convention is to give them names (and tandem names) of the form {something}VisibleProperty.

So these should Properties and their tandems should be renamed to predictMeanVisibleProperty, meanVisibleProperty, and tickMarksVisiblePropery.

@marlitas
Copy link
Contributor

All property names changed. Closing.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Jul 13, 2022

Reopening. I don't see any commits associated with this issue. And I still see the "isShowing" names being used in IntroModel.ts:

  public readonly isShowingPredictMeanProperty: BooleanProperty;
  public readonly isShowingMeanProperty: BooleanProperty;
  public readonly isShowingTickMarksProperty: BooleanProperty;

@marlitas
Copy link
Contributor

Closing. Commits now pushed up.

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