-
Notifications
You must be signed in to change notification settings - Fork 29k
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
Add suggestions for ext filter in the Settings editor search widget #148076
Conversation
@@ -269,6 +274,10 @@ export class SettingsEditor2 extends EditorPane { | |||
if (ENABLE_LANGUAGE_FILTER && !SettingsEditor2.SUGGESTIONS.includes(`@${LANGUAGE_SETTING_TAG}`)) { | |||
SettingsEditor2.SUGGESTIONS.push(`@${LANGUAGE_SETTING_TAG}`); | |||
} | |||
|
|||
extensionManagementService.getInstalled(ExtensionType.System).then(extensions => { |
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 a similar hack that PreferencesSearchService uses to "unwrap" the result from the async API.
@@ -107,7 +107,7 @@ export class SettingsSearchFilterDropdownMenuActionViewItem extends DropdownMenu | |||
localize('extSettingsSearch', "Extension ID..."), | |||
localize('extSettingsSearchTooltip', "Add extension ID filter"), | |||
`@${EXTENSION_SETTING_TAG}`, | |||
false | |||
true |
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 change makes it so the completions list activates after the user selects the option from the funnel button.
const installedExtensionsTags = this.installedExtensionIds.map(extensionId => { | ||
return `@${EXTENSION_SETTING_TAG}${extensionId} `; | ||
}).sort(); | ||
return installedExtensionsTags.filter(extFilter => !query.includes(extFilter)); |
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.
I wonder whether we can show the "display name" of the extension in the suggest widget as well? Maybe you can return a "detail" or "description" to show next to the ID
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.
I'll look into returning completion items for that case.
Ref #145710
This PR adds suggestions for the
@ext
filter in the Settings editor search widget, so now when a user types@ext:
, or when they select the "Extension ID..." option from the funnel button, a list of installed extension IDs will pop up as suggestions to choose from.