WIP: emoji_input: implement fuzzy suggestions #417

Draft
novenary wants to merge 1 commit from novenary/akkoma-fe:fuzzy-emojis into develop
First-time contributor

This makes it a lot easier to find what you're looking for with fewer keystrokes.

Open design questions:

  • should this be optional or replace the existing search algorithm?
  • do we want this in the full emoji picker? if so, what should that look like? the current categorized view doesn't really allow for proper result ranking
This makes it a lot easier to find what you're looking for with fewer keystrokes. Open design questions: - should this be optional or replace the existing search algorithm? - do we want this in the full emoji picker? if so, what should that look like? the current categorized view doesn't really allow for proper result ranking
novenary added 1 commit 2024-09-18 14:14:57 +00:00
emoji_input: implement fuzzy suggestions
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
a624164b39
This makes it a lot easier to find what you're looking for with fewer
keystrokes.
Member

should this be optional or replace the existing search algorithm?

Emoji shortcodes aren’t allowed to contain quotes, thus we could use quoted text for exact search analogous to commonly used search syntax and Akkoma’s database search being strict about order of quoted words

do we want this in the full emoji picker? if so, what should that look like? the current categorized view doesn't really allow for proper result ranking

imho, for consistency yes, both interfaces should ideally use the same search method, but i don’t have good ideas re categories and ranking either

> should this be optional or replace the existing search algorithm? Emoji shortcodes aren’t allowed to contain quotes, thus we could use quoted text for exact search analogous to commonly used search syntax and Akkoma’s database search being strict about order of quoted words > do we want this in the full emoji picker? if so, what should that look like? the current categorized view doesn't really allow for proper result ranking imho, for consistency yes, both interfaces should ideally use the same search method, but i don’t have good ideas re categories and ranking either
Author
First-time contributor

Emoji shortcodes aren’t allowed to contain quotes, thus we could use quoted text for exact search analogous to commonly used search syntax and Akkoma’s database search being strict about order of quoted words

It was pointed out to me that the existing search is regex, so I could see some users appreciate the option to choose. As far as "exact" search is concerned, fzy.js already ranks exact substring matches at the top, so I think the results should be rather unsurprising for users who don't expect fuzzy matching.

> Emoji shortcodes aren’t allowed to contain quotes, thus we could use quoted text for exact search analogous to commonly used search syntax and Akkoma’s database search being strict about order of quoted words It was pointed out to me that the existing search is regex, so I could see some users appreciate the option to choose. As far as "exact" search is concerned, fzy.js already ranks exact substring matches at the top, so I think the results should be rather unsurprising for users who don't expect fuzzy matching.
Member

It was pointed out to me that the existing search is regex

huh, TIL; how about using slashes instead of quotes then; e.g. /p[ae]t/? Those too are not allowed in shortcodes

fzy.js already ranks exact substring matches at the top, so I think the results should be rather unsurprising for users who don't expect fuzzy matching.

It works out when you know/suspect it ranks it first and pay attention, though I’ve been fooled a couple times into searching the result list for the desired emoji before realizing none was an exact match and the emoji just doesn’t exist on the server (or at least not under this name) This will already be taken care of with regex search though

> It was pointed out to me that the existing search is regex huh, TIL; how about using slashes instead of quotes then; e.g. `/p[ae]t/`? Those too are not allowed in shortcodes > fzy.js already ranks exact substring matches at the top, so I think the results should be rather unsurprising for users who don't expect fuzzy matching. It works out when you know/suspect it ranks it first and pay attention, though I’ve been fooled a couple times into searching the result list for the desired emoji before realizing none was an exact match and the emoji just doesn’t exist on the server *(or at least not under this name)* This will already be taken care of with regex search though
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fuzzy-emojis:novenary-fuzzy-emojis
git checkout novenary-fuzzy-emojis
Sign in to join this conversation.
No description provided.