Repository navigation
Conversation
Search now matches the words of a query in any order, so a tree row shown as "Navattic › New project" is found by "navattic new" as well as "new navattic". Single-word searches score as before; `commandScore` is unchanged. Closes UI-654
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Menu search matched the whole query as one in-order run over
value, thenkeywords, then the values of a row's tree parents. A tree row reads "Navattic › New project", but only "new navattic" found it. Data-first menus ignore a consumerfilter, so consumers couldn't work around this.defaultFilternow accepts the words of a query in any order.ListboxStore(children-based menus, select, combobox) and data-firstscoreNodesboth use it as their default:The parent-only check keeps a query like "new project" from lifting every child of a "New project templates" tree above a closer "Create new project" row.
commandScoreitself is unchanged and still exported.Evidence
A tree with "Navattic › New project", "Navattic › Starter-chip matching" and "Acme › New project", run through
filterNodes(tree-nodes.test.ts):navattic newnew navatticnav projnavattic starterstarter navatticnavattic xyzSingle-word scores are pinned equal to
commandScore, including padded and hyphenated queries, and a "de" ranking across four items is pinned. Single-word tree results keep their existing order.Merge Danger
Door: two-way
Revert the commit to get the old matching back. No data or API shape changes.
Blast Radius: search
Every menu, command menu, select and combobox using the default filter gets this, as does any consumer calling
defaultFilterdirectly. Multi-word queries match more than before: each word only has to match somewhere, so short words like "e e" match broadly. Results that matched before never score lower, but they can be outranked by rows that newly match. Multi-word queries cost roughly 2–3× more scoring per keystroke. Single-word queries behave the same as before.Closes UI-654