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

Add ability to stream or push items into a Quickpick #21372

Closed
eamodio opened this issue Feb 24, 2017 · 6 comments
Closed

Add ability to stream or push items into a Quickpick #21372

eamodio opened this issue Feb 24, 2017 · 6 comments
Assignees
Labels
api feature-request Request for new features or functionality quick-pick Quick-pick widget issues

Comments

@eamodio
Copy link
Contributor

eamodio commented Feb 24, 2017

  • VSCode Version: 1.10.0-insider 256d76f
  • OS Version: macOS Sierra 10.12.3 (16D32)

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.

@jrieken jrieken added api feature-request Request for new features or functionality quick-pick Quick-pick widget issues labels Feb 24, 2017
@jrieken
Copy link
Member

jrieken commented Feb 24, 2017

way to pass an array of promises to showQuickPick that

We do allow a single promise that resolves to an array of strings or message item, like so

const myPromisedItems = new Promise(resolve => resolve(['one', 'two', 'three']);
vscode.window.showQuickPick(myPromisedItems)

What we don't support is to update the quick pick later, neither with a promise nor with a sync set of items

@eamodio
Copy link
Contributor Author

eamodio commented 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
Copy link
Member

jrieken commented 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
Copy link
Contributor Author

eamodio commented Feb 27, 2017

Yeah, that is tricky to be sure.

@KnisterPeter
Copy link
Contributor

Just as a reference to track the issue KnisterPeter/vscode-github#84

@jrieken
Copy link
Member

jrieken commented Sep 10, 2018

This can be done with the new API we have: https://code.visualstudio.com/updates/v1_26#_quickinput-api

@jrieken jrieken closed this as completed Sep 10, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api feature-request Request for new features or functionality quick-pick Quick-pick widget issues
Projects
None yet
Development

No branches or pull requests

3 participants