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

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

Closed
wants to merge 4 commits into from

Conversation

@sylveon
Copy link
Contributor

sylveon commented Apr 13, 2018

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

This comment has been minimized.

Copy link
Member

dbaeumer commented Apr 16, 2018

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.

@sylveon

This comment has been minimized.

Copy link
Contributor Author

sylveon commented Apr 18, 2018

@dbaeumer Sure. Should this be enabled or disabled by default?

@dbaeumer

This comment has been minimized.

Copy link
Member

dbaeumer commented Apr 19, 2018

To not break anyone it should be off by default.

@sylveon

This comment has been minimized.

Copy link
Contributor Author

sylveon commented Apr 20, 2018

Done.

@dbaeumer

This comment has been minimized.

Copy link
Member

dbaeumer commented Apr 23, 2018

@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

This comment has been minimized.

Copy link
Contributor Author

sylveon commented Apr 28, 2018

@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 dbaeumer added this to the May 2018 milestone May 7, 2018
@dbaeumer

This comment has been minimized.

Copy link
Member

dbaeumer commented May 30, 2018

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

@sylveon

This comment has been minimized.

Copy link
Contributor Author

sylveon commented May 31, 2018

Done

@dbaeumer

This comment has been minimized.

Copy link
Member

dbaeumer commented Jun 8, 2018

@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

This comment has been minimized.

Copy link

GeorgeWL commented Jun 13, 2018

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

This comment has been minimized.

Copy link
Contributor

isidorn commented Aug 2, 2018

Not for this milestone, pushing out to August

@isidorn isidorn modified the milestones: July 2018, August 2018 Aug 2, 2018
@sylveon

This comment has been minimized.

Copy link
Contributor Author

sylveon commented Aug 2, 2018

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

This comment has been minimized.

Copy link

GeorgeWL commented Aug 3, 2018

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

@alexandrudima

This comment has been minimized.

Copy link
Member

alexandrudima commented Aug 31, 2018

Cleaning up milestone

@kieferrm kieferrm modified the milestones: September 2018, October 2018 Oct 1, 2018
@joaomoreno joaomoreno modified the milestones: October 2018, November 2018 Nov 8, 2018
@roblourens roblourens removed this from the December/January 2019 milestone Feb 1, 2019
@markfinlabs

This comment has been minimized.

Copy link

markfinlabs commented Apr 2, 2019

Update 2: @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: @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

This comment has been minimized.

Copy link
Member

dbaeumer commented Apr 3, 2019

@alexr00 can I loop you in here?

@alexr00 alexr00 assigned alexr00 and unassigned dbaeumer Apr 3, 2019
@alexr00

This comment has been minimized.

Copy link
Member

alexr00 commented Apr 8, 2019

@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 alexr00 added this to the October 2019 milestone Oct 24, 2019
alexr00 added a commit that referenced this pull request Oct 24, 2019
@alexr00

This comment has been minimized.

Copy link
Member

alexr00 commented Oct 24, 2019

@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

@alexr00 alexr00 closed this Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.