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

Search relevance in Quick Pick control #18003

Closed
ramya-rao-a opened this issue Jan 2, 2017 · 13 comments
Closed

Search relevance in Quick Pick control #18003

ramya-rao-a opened this issue Jan 2, 2017 · 13 comments
Assignees
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@ramya-rao-a
Copy link
Contributor

From @ahmetalpbalkan on July 12, 2016 22:18

Obviously os should be the first output here:

image

In this case io is literally at the end

image
image

Copied from original issue: microsoft/vscode-go#390

@ramya-rao-a
Copy link
Contributor Author

From @ahmetalpbalkan on December 18, 2016 2:16

This is still very much an issue.

@ramya-rao-a ramya-rao-a changed the title Search relevance in 'Add import' Search relevance in Quick Pick control Jan 2, 2017
@ramya-rao-a
Copy link
Contributor Author

The Go extension uses the vscode.window.showQuickPick to show list of packages that can be imported when the Go: Add Import command is run.

When user enters text to filter through such a list, the first item is always the default selected item.
This can be made smarter by choosing the item that matches the filter text the most instead.

@jrieken jrieken assigned bpasero and unassigned jrieken Jan 3, 2017
@bpasero bpasero added this to the January 2017 milestone Jan 3, 2017
@bpasero
Copy link
Member

bpasero commented Jan 3, 2017

I think what we do today in the picker is just to preserve the order of elements as they where given to the picker API. Since the sorting order can be very much dependent on the context, I think we should have a way for API users to control the sorting behaviour for matching elements.

@bpasero bpasero added api feature-request Request for new features or functionality workbench labels Jan 3, 2017
@bpasero bpasero removed this from the January 2017 milestone Jan 3, 2017
@bpasero bpasero removed their assignment Jan 3, 2017
@bpasero bpasero changed the title Search relevance in Quick Pick control Allow extensions to control search relevance in Quick Pick control Jan 3, 2017
@bpasero bpasero changed the title Allow extensions to control search relevance in Quick Pick control Allow extensions to control search relevance in picker Jan 3, 2017
@jrieken
Copy link
Member

jrieken commented Jan 3, 2017

I think what we do today in the picker is just to preserve the order of elements as they where given to the picker API. Since the sorting order can be very much dependent on the context, I think we should have a way for API users to control the sorting behaviour for matching elements.

Disagree, because we allow multiple provider to contribute to that UI at the same time. Therefore a provider cannot define the sort order of n merged results.

The issue about us not being smart in picking stuff from quick pick

@jrieken jrieken changed the title Allow extensions to control search relevance in picker Search relevance in Quick Pick control Jan 3, 2017
@jrieken jrieken removed api feature-request Request for new features or functionality labels Jan 3, 2017
@bpasero
Copy link
Member

bpasero commented Jan 3, 2017

@jrieken can you give an example where multiple providers add stuff to the showQuickPick API at the same time? I was not aware this is possible today.

@jrieken
Copy link
Member

jrieken commented Jan 3, 2017

Sorry, I miss read this is about quick pick. However, the more general case of navigate types (in file, in workspace) has this problem and provider-scope ranking/sorting is not an option there.

I am not a fan of putting the burden on the extension writer for this as quick pick is about selecting an element from a list of static elements. To me there some pretty obvious failure of our ranking algorithm as not os (2 of 2 characters matched) but os/exec (2 of 7 characters matched) is pre-selected

@bpasero bpasero added this to the January 2017 milestone Jan 3, 2017
@bpasero bpasero closed this as completed in 8b834d0 Jan 4, 2017
@bpasero
Copy link
Member

bpasero commented Jan 4, 2017

@ramya-rao-a I pushed a change to use our typical sorter that we use in other quick open handlers too. What would be the best way of verifying this issue using the go extension?

@bpasero bpasero added the verification-needed Verification of issue is requested label Jan 4, 2017
@ramya-rao-a
Copy link
Contributor Author

You can run the Go: Add Import command in the command pallet. That will open a quick pick. Type away to filter

@bpasero bpasero added the feature-request Request for new features or functionality label Jan 8, 2017
@ahmetb
Copy link

ahmetb commented Jan 13, 2017

I have been disabling all extensions for the 5th time now because it is the first option and not the "Install Extensions".

image

@bpasero
Copy link
Member

bpasero commented Jan 14, 2017

There was no change in the relevance sorting for the command palette btw.

@ramya-rao-a
Copy link
Contributor Author

@ahmetalpbalkan

Can you open a separate issue for #18003 (comment) which is about the commands in the command pallet.

The original issue here was about the quick pick control (which in this particular case was when the Go: Add Import command was run).

The fix for the original issue is available in the insiders build, just tested it.

@bpasero
Copy link
Member

bpasero commented Jan 23, 2017

@ramya-rao-a did you verify this fix, then could you maybe add the verified label?

As for the command palette this is #14727

@ramya-rao-a ramya-rao-a added the verified Verification succeeded label Jan 23, 2017
@ramya-rao-a
Copy link
Contributor Author

Verified.

@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
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants