Unable to hide localization tab
Closed this issue · 3 comments
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
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:
- 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. - You were viewing only the "Featured" elements and
LocalizationTab.visibleProperty
is currentlyphetioFeatured: false
. I've opened phetsims/joist#875 to feature each tab'svisibleProperty
.
Self-assigning to update the PhET-iO Guide.
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.
You're right. I didn't have the dialog open first. Thanks @arouinfar and sorry about that!