-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Respect included
property on preferences
#11588
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msujew I confirmed that the preference is hidden from the UI but I believe we need more.
The preference still exists as a suggestion in the settings.json
and setting the preference still takes effect which can cause unwanted side effects.
In my example I also set workbench.statusBar.visible
to include: false
and it still shows up, and takes effect:
@vince-fugnitto Right, I'll look into that 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the correct approach - preventing the preference from ever being registered with the schema at all. In testing, this prevents undesired / inapplicable preferences from appearing in any context. 👍
'window.menuBarVisibility': {
type: 'string',
enum: ['classic', 'visible', 'hidden', 'compact'],
markdownEnumDescriptions: [
nls.localizeByDefault('Menu is only hidden in full screen mode.'),
nls.localizeByDefault('Menu is always visible even in full screen mode.'),
nls.localizeByDefault('Menu is always hidden.'),
nls.localizeByDefault('Menu is displayed as a compact button in the sidebar. This value is ignored when `#window.titleBarStyle#` is `native`.')
],
default: 'classic',
scope: 'application',
// eslint-disable-next-line max-len
markdownDescription: nls.localizeByDefault("Control the visibility of the menu bar. A setting of 'toggle' means that the menu bar is hidden and a single press of the Alt key will show it. By default, the menu bar will be visible, unless the window is full screen."),
included: !isOSX
}, The |
What it does
Closes #11587. Preferences that should not be included (i.e.
included: false
) are ignored when building the preference schema.How to test
included
properties tofalse
)Review checklist
Reminder for reviewers