-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
align how tasks are displayed as quick open items #7392
Conversation
789245b
to
2043d91
Compare
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.
The changes look good to me, and they work as intended for a multi-root workspace.
I am able to see the source, the subfolder name (if present), and the root name when performing:
- run task
- show running task
- restart running task
- terminate task
I did notice that attach task
did not have the same formatting as others however, but I'm unsure if it is in the scope of this pull-request:
2043d91
to
1817687
Compare
Thank you for the review @vince-fugnitto ! The "attach task" menu items should definitely be updated as well. |
} | ||
if (task.terminalId) { | ||
this.taskService.attach(task.terminalId, task.taskId); | ||
} |
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.
btw, the question is not related to your PR, but maybe you have an answer:
To be honest, I didn't use this action and I don't see Terminal
-> Attach Task
action in VS Code.
Tried to use the action in Theia:
quick-open
items are created for running tasks withterminalId
, so, I guess, a terminal widget already open for such tasks- it creates one more terminal for a running task
What's the use case for using this action?
thanks in advance!
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.
It is used in 2 cases in my opinion
- the user closed the browser for some reason, when s/he reopens the workspace s/he wants to reconnect to the task
- the user wants someone that opens the same workspace to see the task output
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.
Why I asked:
it's strange for me that it creates one more terminal:
- we give
terminalId
,taskId
attach
method askswidgetManager
get or create widget.
So, it's expected to get existed widget, but it creates a new one.
OK, anyway it's not related to the current PR.
thank you for the answer!
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.
Why I asked:
it's strange for me that it creates one more terminal:
- we give
terminalId
,taskId
attach
method askswidgetManager
get or create widget.So, it's expected to get existed widget, but it creates a new one.
yea i filed an issue for the problem you describe: #7407
i think:
- we should set focus to the teminal widget if there is already a terminal widget
- we should create a new widget if we couldn't find that widget - this is likely to happen, as the localstorage could possibly be cleared, or users use a different machine to access the same workspace
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.
Tested for tsc
detected and configured tasks for single and multi root workspace as well:
- labels for items for
Terminate Task
,Show Running Tasks
,Restart Running Task
,Attach Task
actions are aligned - I don't see any regression
thanks @elaihau!
- In a multi root workspace, detected tasks are displayed in different ways across `Run task`, `Restart running task`, `Terminate task`, and `Show running tasks`. This change aligns the display of the task quick open items. - fixed #6821 Signed-off-by: Liang Huang <[email protected]>
1817687
to
ceb7a31
Compare
In a multi root workspace, detected tasks are displayed in different
ways across
Run task
,Restart running task
,Terminate task
,and
Show running tasks
. This change aligns the display of the taskquick open items.
fixed Align task items #6821
Signed-off-by: Liang Huang [email protected]
How to test
Terminal -> Run task
,Terminal -> Restart running task
,Terminal -> Terminate task
,and
Terminal -> Show running tasks
.They should all be displayed as
npm: test <- subfolder name / path> [root folder name]
Review checklist
Reminder for reviewers