Search relevance in Quick Pick control #18003

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

Projects

None yet

4 participants

@ramya-rao-a
Member

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
Member

From @ahmetalpbalkan on December 18, 2016 2:16

This is still very much an issue.

@ramya-rao-a ramya-rao-a referenced this issue in Microsoft/vscode-go Jan 2, 2017
Closed

Search relevance in 'Add import' #390

@ramya-rao-a ramya-rao-a changed the title from Search relevance in 'Add import' to Search relevance in Quick Pick control Jan 2, 2017
@ramya-rao-a
Member

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 was assigned by rebornix Jan 2, 2017
@jrieken jrieken assigned bpasero and unassigned jrieken Jan 3, 2017
@bpasero bpasero added this to the January 2017 milestone Jan 3, 2017
@bpasero
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 removed this from the January 2017 milestone Jan 3, 2017
@bpasero bpasero removed their assignment Jan 3, 2017
@bpasero bpasero changed the title from Search relevance in Quick Pick control to Allow extensions to control search relevance in Quick Pick control Jan 3, 2017
@bpasero bpasero changed the title from Allow extensions to control search relevance in Quick Pick control to Allow extensions to control search relevance in picker Jan 3, 2017
@jrieken
Member
jrieken commented Jan 3, 2017 edited

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 from Allow extensions to control search relevance in picker to Search relevance in Quick Pick control Jan 3, 2017
@bpasero bpasero was assigned by jrieken Jan 3, 2017
@bpasero
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
Member
jrieken commented Jan 3, 2017 edited

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 in 8b834d0 Jan 4, 2017
@bpasero
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?

@ramya-rao-a
Member

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

@ahmetb
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
Member
bpasero commented Jan 14, 2017

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

@ramya-rao-a
Member

@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
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
Member

Verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment