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
Closed

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

wants to merge 4 commits into from

Conversation

sylveon
Copy link
Contributor

@sylveon 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
Copy link
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 dbaeumer added the info-needed Issue requires more information from poster label Apr 16, 2018
@sylveon
Copy link
Contributor Author

sylveon commented Apr 18, 2018

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

@dbaeumer
Copy link
Member

To not break anyone it should be off by default.

@sylveon
Copy link
Contributor Author

sylveon commented Apr 20, 2018

Done.

@dbaeumer
Copy link
Member

@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
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
Copy link
Member

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

@dbaeumer dbaeumer removed the info-needed Issue requires more information from poster label May 30, 2018
@dbaeumer dbaeumer modified the milestones: May 2018, June 2018 May 30, 2018
@sylveon
Copy link
Contributor Author

sylveon commented May 31, 2018

Done

@dbaeumer
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
Copy link

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
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
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
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.

@alexdima
Copy link
Member

Cleaning up milestone

@alexdima alexdima modified the milestones: August 2018, September 2018 Aug 31, 2018
@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
@markm77
Copy link

markm77 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
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
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
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
@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