Skip to content
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

Fuzzy Matching UI Elements #59

Closed
keithadams opened this issue Aug 16, 2022 · 5 comments
Closed

Fuzzy Matching UI Elements #59

keithadams opened this issue Aug 16, 2022 · 5 comments
Labels
will do feature request that will be implemented

Comments

@keithadams
Copy link

keithadams commented Aug 16, 2022

It'd be great to use fuzzy matching for matches. LaunchBar and fzf have nice fuzzy matching that's worth a look.

Originally from #57 (comment)

The reason I like fuzzy matching so much is that it's more dynamic. A good fuzzy match could match "Read the Documentation" with:

  • read the d
  • rtd
  • readdoc
  • countless others
@godbout
Copy link
Owner

godbout commented Aug 17, 2022

ok, dumping my thoughts here so that i can review later:

there's currently some sort of Fuzzy Matching in Wooshy. for example Read the Documentation can be targeted with:

  • doc read
  • the doc
  • r t d

basically:

  1. beginning of words are matched
  2. word order doesn't matter
  3. space is needed between matches

the idea behind this is:

  1. that you may start filter grossly, and type some more in case you still have too many Targets. so for example for Read the Documentation the first think that comes to (my) mind is doc. i type doc. if i reach the Target, great. if not, if there's still too many Targets, i can add something again to filter more, like read.
  2. keeping/training the muscle memory of typing real words, not stuff like rtd that, at least for me, requires some cognitive work and brings friction. read doc for Read the Documentation is natural for me, rtd is not.

ultimately, different people are asking for different kinds of Fuzzy Matching. a way to cope with this may be to have something similar to The Input Look and the Presets. maybe we can add a Fuzzy Matching Preset, and match the Fuzzy Matching of popular apps like LaunchBar, Alfred, Raycast, Spotlight, etc.

@godbout godbout added the will do feature request that will be implemented label Aug 22, 2022
@godbout
Copy link
Owner

godbout commented Jan 5, 2023

ok i've started working on the Fuzzy Matching. my first implementation was to have different flavors: Wooshy, Alfred, Spotlight, Launchbar, Raycast. after exploring more i've discovered that 1) they quite overlap each other 2) (the most important) they work well for app names, but not so much for what Wooshy is dealing with. so i'm adding two modes, Wooshy Classic, the current mode, where you type exact words, and end up with less noise. then Wooshy Extended, where you can play with Fuzzy Matching. but of course, again, it's not that simple. Launcher apps deal with a fix text (app or folder/file name), Wooshy deals with all the metadata behind. when we do a search, we don't do it on what's visible on the screen, we do it on the whole metadata mashed together. the reason is 1) to cover UI Element roles 2) there's no way to know what is displayed on the screen, especially for the web, web apps, and Electron apps. for native macOS apps for example what you see on a button is its title, but for Electron they can do whatever they want. could be the title, or the label, or the description, or the value, etc. so to cover everything we run the Search Engine on the whole mashed up data. that makes things complicated for the Fuzzy Matching.

currently i have something that matches the beginning of each word, visible or not. works, but you may end up with more results than you may need. see video attached in next comment.

@godbout
Copy link
Owner

godbout commented Jan 5, 2023

ScreenFlow.mp4

not sure it's worth it/useful.

@godbout
Copy link
Owner

godbout commented Jan 5, 2023

i'm having now something a bit better, that needs the first letter of each word to be in the correct order. but again will create some issues on the other side. like sometimes you may want the looseness of not having to type in the correct order. that's the issue of bringing the Fuzzy Matching you're used to—for app names and folder/file names—to a whole text. the needs are gonna be different.

@godbout
Copy link
Owner

godbout commented Jan 7, 2023

added in v4: https://github.com/godbout/Wooshy.docs/releases/tag/4

the full fuzzy matching you're asking in your first post cannot make sense in the case of Wooshy. you'll have way too much pollution. it works fine for something like Launchbar because Launchbar matches against the beginning of app names for example. but Wooshy matches wherever in texts. so something like readdoc to reach read the documentation would return way too many results. i've added a Wooshy Extended Fuzzy Matching Flavor. i think that should help quite a lot already. like i'm gonna close this issue with cwc 😅️

please reopen if you think this is still not ok. thanks!

@godbout godbout closed this as completed Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
will do feature request that will be implemented
Projects
None yet
Development

No branches or pull requests

2 participants