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 localization tab #470

Closed
Nancy-Salpepi opened this issue Oct 21, 2022 · 3 comments
Closed

Unable to hide localization tab #470

Nancy-Salpepi opened this issue Oct 21, 2022 · 3 comments
Assignees
Labels

Comments

@Nancy-Salpepi
Copy link

In the client guide for RC.3, it states that a subset of tabs can be hidden. However, this element isn't in the tree:
gravityAndOrbits.general.view.navigationBar.preferencesButton.preferencesDialogCapsule.preferencesDialog.preferencesTabs.LocalizationTab.visibleProperty.

This is the similar to phetsims/molecule-shapes#230 and #465

@arouinfar
Copy link
Contributor

Thanks for reporting @Nancy-Salpepi. I checked rc.3 in Studio, and I am able to hide the Localization Tab. I think there are two possible reasons you ran into trouble:

  1. You searched for the listed phetioID without first opening the Preferences dialog, so it didn't exist. Dialogs must first be opened before they can be customized. This is mentioned earlier in the guide, but I will add a reminder to open the dialog to the "Hide All Preferences or a Subset of Preferences Tabs" section.
  2. You were viewing only the "Featured" elements and LocalizationTab.visibleProperty is currently phetioFeatured: false. I've opened phetioFeatured defaults for Preferences joist#875 to feature each tab's visibleProperty.

Self-assigning to update the PhET-iO Guide.

@arouinfar
Copy link
Contributor

I addressed (1) in the above commit, and the relevant section of the guide now reads:

To prevent access to all Preferences, hide the preferencesButton.
{{simCamelCaseName}}.general.view.navigationBar.preferencesButton.visibleProperty

To prevent access to individual categories of Preferences, and then hide the associated tab. For example, the Localization tab can be hidden with
{{simCamelCaseName}}.general.view.navigationBar.preferencesButton.preferencesDialogCapsule.preferencesDialog.preferencesTabs.LocalizationTab.visibleProperty

As a reminder, dialogs must first be opened before they can be customized. The above phetioID will not exist until the Preferences dialog is opened.

@Nancy-Salpepi I think this change along with making the tab's visibleProperty featured should address your original issue. If you agree, please close this issue.

@arouinfar arouinfar assigned Nancy-Salpepi and unassigned arouinfar Oct 24, 2022
@Nancy-Salpepi
Copy link
Author

You're right. I didn't have the dialog open first. Thanks @arouinfar and sorry about that!

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

No branches or pull requests

3 participants