selectors: add fuzzy-find search capabilities to filteredQueryResults

Using the Fuse package, we now support fuzzy icon search. Results are
weighted in favor of icon names and sorted by match score, improving
search utility by surfacing best matches to the top of the list.

There is still some fine-tuning to do, as threshold often matches
unrelated strings, while missing more related but less-similar string
queries. In future, we should play with the threshold, location,
distance, and possibly the extendedSearch options.
This commit is contained in:
rektdeckard
2020-09-15 01:07:40 -04:00
parent e24ed796d6
commit b39224073e
2 changed files with 10 additions and 12 deletions

View File

@@ -23,6 +23,7 @@
"dependencies": {
"file-saver": "^2.0.2",
"framer-motion": "^2.1.0",
"fuse.js": "^6.4.1",
"phosphor-react": "^0.2.2",
"react": "^17.0.0-rc.0",
"react-dom": "^17.0.0-rc.0",