You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add ability to stream or push items into a Quickpick #21372
Basically provide a way to add additional items to a quickpick after it is shown and/or provide a way to pass an array of promises to showQuickPick that would add items as each one resolves.
Reacted by Markus Wolf, Kai Liu, adimascio, Даниил Пронин, Gamunu Balagalla, Spown, Fabio Spampinato, cezn and Bartosz
Yeah I was thinking with the array of promises vs a single, is that there could be a race setup where anytime one of the promises was resolved it would add its items to the list -- so entries would somewhat stream in.
For example in my Find Related extension, I kick off a series of promises to search for different file matches, and now currently aggregate them into a single promise that generates the list of quickpick items, but it would be great if I could have the items returned by each promise added to the list when it became ready. So longer searches don't block the shorter ones.
Understood. The big challenge with streaming results (to basically anywhere) is how the UI should behave. Once a subset of results is in users can filter and select one and it will be hard to keep the UX stable when more results come in, esp wrt sorting
Activity
jrieken commentedon Feb 24, 2017
We do allow a single promise that resolves to an array of strings or message item, like so
What we don't support is to update the quick pick later, neither with a promise nor with a sync set of items
eamodio commentedon Feb 24, 2017
Yeah I was thinking with the array of promises vs a single, is that there could be a race setup where anytime one of the promises was resolved it would add its items to the list -- so entries would somewhat stream in.
For example in my Find Related extension, I kick off a series of promises to search for different file matches, and now currently aggregate them into a single promise that generates the list of quickpick items, but it would be great if I could have the items returned by each promise added to the list when it became ready. So longer searches don't block the shorter ones.
jrieken commentedon Feb 27, 2017
Understood. The big challenge with streaming results (to basically anywhere) is how the UI should behave. Once a subset of results is in users can filter and select one and it will be hard to keep the UX stable when more results come in, esp wrt sorting
eamodio commentedon Feb 27, 2017
Yeah, that is tricky to be sure.
KnisterPeter commentedon Sep 4, 2017
Just as a reference to track the issue KnisterPeter/vscode-github#84
jrieken commentedon Sep 10, 2018
This can be done with the new API we have: https://code.visualstudio.com/updates/v1_26#_quickinput-api