-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Interleaves search results across categories #706
Interleaves search results across categories #706
Conversation
Thanks @JasonWeill would you mind adding a test for this? And the linter is not happy 😉 |
Could it be an option to have either one or the other behaviour? Od note the headings are still shown in JupyterLab when using command palette in the sidebar and the old behaviour makes more sense there. The PR title also suggest that this is an addition of an option rather than a change in behaviour |
I've added a unit test specifically about I don't think that this should be an option. Searching for commands by a keyword should return the highest-scoring results first. What is the value of displaying many low-score results in a large category, pushing down a high-scoring result from another, smaller, category? |
@fcollonval Added a unit test for the search functionality. I'd appreciate if you could review when you get the time. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @JasonWeill
Fixes jupyterlab/jupyterlab#9659.
Allows search results in the command palette to be interleaved across groups.
Before the change, low-scoring search results are still grouped together, leaving higher-scoring search results in other groups lower:
After the change, search results are strictly sorted in descending score order. Headers for the same group may occur more than once. If two successive search results have the same header, then we don't display a new header.