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

fix: configure tasks from open task quick pick #13367

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

AlexandraBuzila
Copy link
Contributor

What it does

The gear icon in the task quick pick should open the task configuration.

Fixes #13086

Contributed on behalf of STMicroelectronics

How to test

  1. Open the task quick pick from >Task: Run Task...
  2. For any configured task, press the gear icon → the tasks.json configuration file should open

Or:

  1. Open the task quick pick from >Task: Run Task...
  2. Select a task category from the dialog, e.g. npm
  3. In the list of tasks, press the gear icon → the tasks.json configuration file should open

Review checklist

Reminder for reviewers

@@ -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 as QuickPickItem));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems odd that we have to case here, but not below. Any idea why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two methods have different signatures 😄
Here the item can be a separator as well, even if it won't happen (separators won't have buttons that will trigger this method). However, to make this nicer I updated the code and added a check here, instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was the question: is it true that one time the button item can be a separator as well or is that a mistake in the typing of "picker.onDidTriggerItemButton()"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tsmaeder! No, the item passed to the button cannot be a separator. The separator only has a label and no buttons. I restricted the type in the interface for this method. Ideally, we would have a dedicated type for a separator picker, that does not have this method at all, but I think that refactoring is out of scope for this PR.

@Henderv

This comment was marked as spam.

The gear icon in the task quick pick should open the task configuration.

Fixes eclipse-theia#13086

Contributed on behalf of STMicroelectronics

Signed-off-by: Alexandra Buzila <abuzila@eclipsesource.com>
Copy link
Contributor

@tsmaeder tsmaeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@tsmaeder tsmaeder merged commit 84a54f4 into eclipse-theia:master Feb 13, 2024
14 checks passed
@jfaltermeier jfaltermeier added this to the 1.47.0 milestone Feb 29, 2024
@AlexandraBuzila AlexandraBuzila deleted the fix/configure-tasks branch May 29, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Cannot configure provided tasks
4 participants