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

[Feature Request]: Expose IQuickOpenService as public api #22334

Closed
balajikris opened this issue Mar 9, 2017 · 4 comments
Closed

[Feature Request]: Expose IQuickOpenService as public api #22334

balajikris opened this issue Mar 9, 2017 · 4 comments
Assignees
Labels
api *duplicate Issue identified as a duplicate of another issue(s)

Comments

@balajikris
Copy link

balajikris commented Mar 9, 2017

  • VSCode Version: 1.10.0
  • OS Version: win10

Steps to Reproduce:

I'm trying to build an extension that presents a list of npm-packages in the command palette. As the user scrolls down the list, I would like to show a preview-html of the package's README in a virtual document (see screenshot). The existing InputOptions do not help me in accomplishing this. For now, I'm using showQuickPick but I don't think it exposes a callback for the event of user moving down the list.

This experience would be similar to how vscode accomplishes previewing a color theme when the user is browsing through the different available themes from the command palette. This code is what I think I need, but it is not part of the public api.

// Thanks to @hoovercj for helping me navigate through the source.

screenshot:
image

@hoovercj
Copy link
Member

hoovercj commented Mar 9, 2017

I would also like to take advantage of this api.

I have an extension for a language called octo and I bundle documentation and sample code with it. As the OP does, I use quick picks to expose those and it would be hugely beneficial if I could simultaneously show the content of docs or sample code in an editor as the user cycles through the options.

@jrieken
Copy link
Member

jrieken commented Mar 10, 2017

@jrieken jrieken closed this as completed Mar 10, 2017
@jrieken jrieken added the *duplicate Issue identified as a duplicate of another issue(s) label Mar 10, 2017
@hoovercj
Copy link
Member

hoovercj commented Mar 11, 2017

@balajikris you and I both missed something obvious. oops!

QuickPickOptions takes an onDidSelectItem callback that does what we both need.

I connected it with a TextDocumentContentProvider in a sample extension here which I'll be folding into my real extensions after this fix comes out with the next release.

demo
I hope that helps!

@balajikris
Copy link
Author

balajikris commented Mar 13, 2017

@hoovercj ah! I see. I noticed that event but got confused as to what selection meant - cycling through with arrow keys or commiting one by hitting Enter. Thanks for looking into this -- your api-playground idea is awesome, I'll take a peek. Thanks much!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

4 participants