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

Initial cut of seeded command palette #171293

Merged
merged 2 commits into from
Jan 17, 2023
Merged

Conversation

TylerLeonhardt
Copy link
Member

Fixes #169091

@TylerLeonhardt TylerLeonhardt marked this pull request as ready for review January 17, 2023 21:03
@vscodenpa vscodenpa added this to the January 2023 milestone Jan 17, 2023
@TylerLeonhardt TylerLeonhardt merged commit fc4fba3 into main Jan 17, 2023
@TylerLeonhardt TylerLeonhardt deleted the tyler/shocked-albatross branch January 17, 2023 23:44
@@ -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."),
Copy link
Member

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?

Copy link
Member Author

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');
Copy link
Member

@bpasero bpasero Jan 18, 2023

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:

private updateFontAliasing(e: IConfigurationChangeEvent | undefined, configurationService: IConfigurationService) {

@github-actions github-actions bot locked and limited conversation to collaborators Mar 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Commonly Used" list in the first-time-opened Command Palette
4 participants