Emoji search returns wrong or no emojis
illtellyoulater opened this issue ยท 5 comments
Bug Report
Current Behavior
Searching returns wrong emojis, or no emoji, for example searching "happy" shows: ๐๐
Expected behavior/code
I think it should return these ones ๐๐๐๐๐, perhaps even this one ๐ฉ (๐)
Environment
- emoji-copy version(s): [9]
- npm version: [not sure this applies? I don't have it installed though]
- OS: [e.g. GNOME 42.5, Pop!_OS 22.04]
Possible Solution
I think your extension uses Gnome emoji system under the hood (which can be run by default with this sequence CTRL-SHIFT-e-SPACE), because it seems that when I search "happy" there, the same ๐ is shown (and the wrong one ๐ is not shown).
This little bug apart, it would be cool if we could do something to make the Gnome emoji system itself respond to more words, as your extension would benefit from this too.
Additional context/Screenshots
n/a
Hello, friend!
Thanks for reporting this bug! ๐ฏ
Sorry for taking too long to reply ๐
Looks like it's true! I just tested it and "happy" is returning: ๐๐ - Nice catch!
I tested other words like: "sad", "smile" and even "surprise", they seem to work just fine!
I highly agree that we should build a better searching system. The current one is pretty simple and archaic!
I will keep this issue on track! Thank you so much for reporting!
Feel free to contribute or share, if you get any solution! โค๏ธ
Will be more than glad to collaborate if I can! Your good vibes and kind words are highly appreciated! Keep up the great work! ๐๐ฆ
Thanks buddy! ๐
Looks like the file we need to change is this one: emoji-copy@felipeftn/data/emojisKeywords.js.
Take a look at the word: "happy".
You may see two emojis using this word: person raising hand (Line 270) and unamused face (Line 54).
Looks like the best way to make a better emoji search filter, is by adding and changing the words in this file. maybe GPT can help too ๐
Do you want to work on this improvement? It seems to be a simple task, updating the keywords for each emoji on the emojisKeywords.js file.
I will be working on the Gnome 45 migration before this.
Feel free to open an PR to contribute!
Maybe one can also contact and reuse others work, e.g. https://github.com/github/gemoji (see field tags
in db/emoji.json) (MIT License)