Skip to content

Skip quick picker when there is only one task to select from - #47853

Closed
Charles Milette (sylveon) wants to merge 4 commits into
microsoft:masterfrom
sylveon:skip-quick-picker-single-task
Closed

Skip quick picker when there is only one task to select from#47853
Charles Milette (sylveon) wants to merge 4 commits into
microsoft:masterfrom
sylveon:skip-quick-picker-single-task

Conversation

@sylveon

Copy link
Copy Markdown
Contributor

I find it particularly annoying when it asks me what to select from when there's only one choice. This skips the quick picker and proceeds directly when there is only one task to choose from.

@dbaeumer

Copy link
Copy Markdown
Member

I had this a long time ago but then users complained that they want to have a consistent behavior independent of 1 or n tasks :-). So if we add this back it has to go behind a setting.

@dbaeumer Dirk Bäumer (dbaeumer) added the info-needed Issue requires more information from poster label Apr 16, 2018
@sylveon

Copy link
Copy Markdown
Contributor Author

Dirk Bäumer (@dbaeumer) Sure. Should this be enabled or disabled by default?

@dbaeumer

Copy link
Copy Markdown
Member

To not break anyone it should be off by default.

@sylveon

Copy link
Copy Markdown
Contributor Author

Done.

@dbaeumer

Copy link
Copy Markdown
Member

Charles Milette (@sylveon) One minor thing. The setting should be in the task namespace not in the quickPick. However there might be a problem since tasks is overloaded with tasks.json. Have you tried tasks.skipPicker ?

@sylveon

Copy link
Copy Markdown
Contributor Author

Dirk Bäumer (@dbaeumer) I added a tasks configuration namespace, but it effectively seems affected by tasks.json.

Using task instead of tasks as lazy fix would work.

@dbaeumer Dirk Bäumer (dbaeumer) added this to the May 2018 milestone May 7, 2018
@dbaeumer

Copy link
Copy Markdown
Member

Sorry for the long delay. Using task as a workaround makes perfect sense to me.

@sylveon

Copy link
Copy Markdown
Contributor Author

Done

@dbaeumer

Copy link
Copy Markdown
Member

Charles Milette (@sylveon): I looked at the PR yesterday and I noticed that the tasks are now resolved outside of the quick pick. I see why this is happening however this results in the fact that the user has no progress feedback as long as the promise is resolved. This might not be so problematic for terminate and restart, however it will be for run since this on first execution might take some seconds. I need to think about what we can do here. Merging this is as is will make users unhappy where task resolving takes some time.

@GeorgeWL

Copy link
Copy Markdown

Came from #51699

Might it make sense then, to solve the issue with quick picker if it's used for run, to add a settings option for run that's separate from the restart/terminate settings option?

Until can find a better solution that is.

@isidorn

Copy link
Copy Markdown

Not for this milestone, pushing out to August

@sylveon

Copy link
Copy Markdown
Contributor Author

Perhaps it's possible to do something like this. If the promise in the quick pick resolves without the user picking something, and there's only one option that results out of it, pick it. But if there's multiple, don't.

@GeorgeWL

Copy link
Copy Markdown

Charles Milette (@sylveon) feels hacky, and against the way other stuff works, where if the user doesn't take a second action it cancels it.

@alexdima

Copy link
Copy Markdown
Member

Cleaning up milestone

@markm77

Mark Murphy (markm77) commented Apr 2, 2019

Copy link
Copy Markdown

Update 2: Alex Ross (@alexr00) Thanks for the response, I investigated this in more detail tonight and realised actually task had run to completion by the time I performed the restart shortcut. If restart occurred before completion the picker was not shown (desired behaviour). Apologies as I should have picked this up before contributing here. My personal preference would be for restart to behave the same before or after task completion but this is not worth a feature request....


Update: Alex Ross (@alexr00) would you like me to open a new issue for this comment as I don't think it's really in the right place? I would simply request that task keyboard shortcuts such as workbench.action.tasks.restartTask not show the picker when args variable is present (since user has already instructed task(s) to use).


Just hit issue in this area (actually probably more like #51699 but that has been deemed a dup of this).

I expected my workbench.action.tasks.restartTask shortcut to work the same as my existing workbench.action.tasks.runTask shortcut, i.e. use my task argument to directly restart. (Shortcut in both cases has args variable with label of single task.)

Very surprised to see the picker.... which means the two are inconsistent.

NB: I'm fine and even agree with a single task picker when selecting Run/Restart Tasks from UI, so this issue is a bit different. Maybe I should open a new issue (or would that be seen as a dup)?

@dbaeumer

Copy link
Copy Markdown
Member

Alex Ross (@alexr00) can I loop you in here?

@alexr00

Copy link
Copy Markdown
Member

@markfinlabs, it sounds like you are seeing a different issue. Yes please do open a new issue for it and I will take a look.

@alexr00 Alex Ross (alexr00) added this to the October 2019 milestone Oct 24, 2019
Alex Ross (alexr00) added a commit that referenced this pull request Oct 24, 2019
@alexr00

Copy link
Copy Markdown
Member

Charles Milette (@sylveon) thanks for working on this change! I have pushed a different version of it that doesn't resolve the tasks outside of the quick pick. The name of the setting is task.quickOpen.skip

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants