matrix-org / emojibase-bindings

Packages emojibase bindings for iOS and Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mismatches between emoji labels and emoji faces

strypey opened this issue Β· comments

I'm told that emojibase-bindings is used for the labels accompanying the emoji in Element-web:
element-hq/element-web#25974 (comment)

That was in response to my feedback about these labels, which I'll copypasta here for your convenience:

Your use case

I would like all of the emoji in Element-web to have word labels that match what the emoji expression looks like. Many of them currently have labels that seem completely mismatched. For example, this one πŸ˜‹ is labeled "Face Savouring Food".

Have you considered any alternatives?

Really not sure what alternative there is other than putting very small sticky notes on my screen and writing my own labels on them. Of course, I'd have to keep pulling them off to use other apps, and putting them on again whenever I wanted to use an emoji in matrix πŸ˜‹

You see? That's what I use that emoji for. To indicate a comment that's intended to be cheeky, and slightly sarcastic, but friendly.

Additional context

Perhaps there's some different in culture or neurotype that causes me interpret πŸ˜‹ differently from most people, but that's not what that emoji suggests to me, nor what I would use it for.

The following are tags available for πŸ˜‹
["delicious","face","savouring","smile","yum"] in the emojibase dataset.

From testing the UI on element web, it doesn't allow you match on these. I think it is just allowing the user match on shortcode and label.

So re-opening the origin element web issue, requesting that element web allow matching on tags might be appropriate.

Make sense @t3chguy ?

@langleyd adding matching on tags is trivial but doesn't sound like it'd help the OP who wants it to match cheeky or slightly sarcastic as far as I can tell.

Subject: [PATCH] i18n
---
Index: src/autocomplete/EmojiProvider.tsx
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/autocomplete/EmojiProvider.tsx b/src/autocomplete/EmojiProvider.tsx
--- a/src/autocomplete/EmojiProvider.tsx	(revision 23cece29f5704e0e2d2abde62e2d4a4d13696c27)
+++ b/src/autocomplete/EmojiProvider.tsx	(date 1695036948679)
@@ -91,6 +91,7 @@
         });
         this.nameMatcher = new QueryMatcher(SORTED_EMOJI, {
             keys: ["emoji.label"],
+            funcs: [(o) => o.emoji.tags ?? []],
             // For removing punctuation
             shouldMatchWordsOnly: true,
         });
Index: src/autocomplete/QueryMatcher.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/autocomplete/QueryMatcher.ts b/src/autocomplete/QueryMatcher.ts
--- a/src/autocomplete/QueryMatcher.ts	(revision 23cece29f5704e0e2d2abde62e2d4a4d13696c27)
+++ b/src/autocomplete/QueryMatcher.ts	(date 1695036831210)
@@ -65,11 +65,7 @@
         this._items = new Map();
 
         for (const object of objects) {
-            // Need to use unsafe coerce here because the objects can have any
-            // type for their values. We assume that those values who's keys have
-            // been specified will be string. Also, we cannot infer all the
-            // types of the keys of the objects at compile.
-            const keyValues = at<string>(<any>object, this._options.keys);
+            const keyValues = at<string>(object, this._options.keys);
 
             if (this._options.funcs) {
                 for (const f of this._options.funcs) {