Closed JasonWeill closed 1 week ago
Thanks @JasonWeill would you mind adding a test for this? And the linter is not happy :wink:
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 search
, using a similar command palette setup to one of the example files.
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!
Fixes https://github.com/jupyterlab/jupyterlab/issues/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.