Skip to content

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

Closed

Description

@eamodio
  • 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.

Activity

  1. added
    feature-request
    quick-pick
    on Feb 24, 2017
  2. jrieken commented on Feb 24, 2017

    @jrieken
    Contributor

    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

  3. eamodio commented on Feb 24, 2017

    @eamodio
    ContributorAuthor

    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.

  4. jrieken commented on Feb 27, 2017

    @jrieken
    Contributor

    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

  5. eamodio commented on Feb 27, 2017

    @eamodio
    ContributorAuthor

    Yeah, that is tricky to be sure.

  6. KnisterPeter commented on Sep 4, 2017

    @KnisterPeter
    Contributor

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

  7. locked and limited conversation to collaborators on Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

apifeature-requestquick-pick

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions