mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
adds filtering for constant rows in extension qucik access (#208741)
* adds filtering for constant rows in extension qucik access * quick fix and cleanup * last bit of cleaning * removed unused imports
This commit is contained in:
parent
262d4bfaf6
commit
11f4586955
|
@ -39,11 +39,31 @@ export class IssueQuickAccess extends PickerQuickAccessProvider<IPickerQuickAcce
|
|||
// Add default items
|
||||
const productLabel = this.productService.nameLong;
|
||||
const marketPlaceLabel = localize("reportExtensionMarketplace", "Extension Marketplace");
|
||||
issuePicksConst.push(
|
||||
{ label: productLabel, ariaLabel: productLabel, accept: () => this.commandService.executeCommand('workbench.action.openIssueReporter', { issueSource: IssueSource.VSCode }) },
|
||||
{ label: marketPlaceLabel, ariaLabel: marketPlaceLabel, accept: () => this.commandService.executeCommand('workbench.action.openIssueReporter', { issueSource: IssueSource.Marketplace }) },
|
||||
{ type: 'separator', label: localize('extensions', "Extensions") }
|
||||
);
|
||||
const productFilter = matchesFuzzy(filter, productLabel, true);
|
||||
const marketPlaceFilter = matchesFuzzy(filter, marketPlaceLabel, true);
|
||||
|
||||
// Add product pick if product filter matches
|
||||
if (productFilter) {
|
||||
issuePicksConst.push({
|
||||
label: productLabel,
|
||||
ariaLabel: productLabel,
|
||||
highlights: { label: productFilter },
|
||||
accept: () => this.commandService.executeCommand('workbench.action.openIssueReporter', { issueSource: IssueSource.VSCode })
|
||||
});
|
||||
}
|
||||
|
||||
// Add marketplace pick if marketplace filter matches
|
||||
if (marketPlaceFilter) {
|
||||
issuePicksConst.push({
|
||||
label: marketPlaceLabel,
|
||||
ariaLabel: marketPlaceLabel,
|
||||
highlights: { label: marketPlaceFilter },
|
||||
accept: () => this.commandService.executeCommand('workbench.action.openIssueReporter', { issueSource: IssueSource.Marketplace })
|
||||
});
|
||||
}
|
||||
|
||||
issuePicksConst.push({ type: 'separator', label: localize('extensions', "Extensions") });
|
||||
|
||||
|
||||
// creates menu from contributed
|
||||
const menu = this.menuService.createMenu(MenuId.IssueReporter, this.contextKeyService);
|
||||
|
|
Loading…
Reference in a new issue