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

Mismatches between emoji labels and emoji faces #12

Open
strypey opened this issue Aug 17, 2023 · 2 comments
Open

Mismatches between emoji labels and emoji faces #12

strypey opened this issue Aug 17, 2023 · 2 comments

Comments

@strypey
Copy link

strypey commented Aug 17, 2023

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.

@langleyd
Copy link
Collaborator

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 ?

@t3chguy
Copy link
Member

t3chguy commented Sep 18, 2023

@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) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants