You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
changed the title [-]Allow extensions to control search relevance in Quick Pick control[/-][+]Allow extensions to control search relevance in picker[/+]on 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
Ramya Rao (@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?
Activity
ramya-rao-a commentedon Jan 2, 2017
From ahmetalpbalkan (old account) (@ahmetalpbalkan) on December 18, 2016 2:16
This is still very much an issue.
[-]Search relevance in 'Add import'[/-][+]Search relevance in Quick Pick control[/+]ramya-rao-a commentedon Jan 2, 2017
The Go extension uses the
vscode.window.showQuickPickto show list of packages that can be imported when theGo: Add Importcommand 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.
bpasero commentedon 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.
[-]Search relevance in Quick Pick control[/-][+]Allow extensions to control search relevance in Quick Pick control[/+][-]Allow extensions to control search relevance in Quick Pick control[/-][+]Allow extensions to control search relevance in picker[/+]6 remaining items
jrieken commentedon 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) butos/exec(2 of 7 characters matched) is pre-selectedbpasero commentedon Jan 4, 2017
Ramya Rao (@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 commentedon Jan 4, 2017
You can run the
Go: Add Importcommand in the command pallet. That will open a quick pick. Type away to filterahmetb commentedon 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".
bpasero commentedon Jan 14, 2017
There was no change in the relevance sorting for the command palette btw.
ramya-rao-a commentedon Jan 14, 2017
ahmetalpbalkan (old account) (@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 Importcommand was run).The fix for the original issue is available in the insiders build, just tested it.
bpasero commentedon Jan 23, 2017
Ramya Rao (@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 commentedon Jan 23, 2017
Verified.
Search relevance in Quick Pick control (fixes microsoft#18003)