Skip to content

Commit

Permalink
fix: configure tasks from open task quick pick (#13367)
Browse files Browse the repository at this point in the history
The gear icon in the task quick pick should open the task configuration.

Fixes #13086

Contributed on behalf of STMicroelectronics

Signed-off-by: Alexandra Buzila <abuzila@eclipsesource.com>
  • Loading branch information
AlexandraBuzila authored Feb 13, 2024
1 parent ef486bd commit 84a54f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/common/quick-pick-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export interface QuickPick<T extends QuickPickItemOrSeparator> extends QuickInpu
readonly onDidAccept: Event<{ inBackground: boolean } | undefined>;
readonly onDidChangeValue: Event<string>;
readonly onDidTriggerButton: Event<QuickInputButton>;
readonly onDidTriggerItemButton: Event<QuickPickItemButtonEvent<T>>;
readonly onDidTriggerItemButton: Event<QuickPickItemButtonEvent<QuickPickItem>>;
readonly onDidChangeActive: Event<T[]>;
readonly onDidChangeSelection: Event<T[]>;
}
Expand Down
6 changes: 5 additions & 1 deletion packages/task/src/browser/quick-open-task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ export class QuickOpenTask implements QuickAccessProvider {
picker.matchOnDescription = true;
picker.ignoreFocusOut = false;
picker.items = this.items;
picker.onDidTriggerItemButton(({ item }) => this.onDidTriggerGearIcon(item));

const firstLevelTask = await this.doPickerFirstLevel(picker);

Expand Down Expand Up @@ -225,7 +226,10 @@ export class QuickOpenTask implements QuickAccessProvider {
execute: () => this.showMultiLevelQuickPick(true)
}));

this.quickInputService?.showQuickPick(providedTasksItems, { placeholder: CHOOSE_TASK });
this.quickInputService?.showQuickPick(providedTasksItems, {
placeholder: CHOOSE_TASK,
onDidTriggerItemButton: ({ item }) => this.onDidTriggerGearIcon(item)
});
}

attach(): void {
Expand Down

0 comments on commit 84a54f4

Please sign in to comment.