-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Initial cut of seeded command palette #171293
Conversation
src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.ts
Outdated
Show resolved
Hide resolved
@@ -333,6 +333,11 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con | |||
'description': localize('preserveInput', "Controls whether the last typed input to the command palette should be restored when opening it the next time."), | |||
'default': false | |||
}, | |||
'workbench.commandPalette.experimental.suggestCommands': { | |||
'type': 'boolean', | |||
'description': localize('suggestCommands', "Controls whether the command palette should have a list of commonly used commands."), |
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.
@TylerLeonhardt should this be marked as an experimental setting to run an experiment and measure the impact?
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.
had a follow up PR doing exactly that.
) { | ||
const suggestCommands = configurationService.getValue<boolean>('workbench.commandPalette.experimental.suggestCommands'); |
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.
@TylerLeonhardt I feel there is now a bit of an ugly repetition of the same code to handle the suggested commands option based on config. What I typically do in these cases is to extract the config handler into a method and then call it twice: once initially and once from the event. The event itself then becomes optional, see for example:
vscode/src/vs/workbench/browser/workbench.ts
Line 264 in d8568bb
private updateFontAliasing(e: IConfigurationChangeEvent | undefined, configurationService: IConfigurationService) { |
Fixes #169091