We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
タイトル通りです。 例えば、:vs:というカスタム絵文字がある場合、これは🆚と被っているため、サジェストでは:vs:が表示されず、🆚のみになります。 入力後のテキストにおいて、:vs:と🆚は別物であるため、両方サジェストされて欲しいと思います。
:vs:
絵文字ピッカーの場合は、Unicode絵文字とカスタム絵文字のサジェストがそれぞれ独立して存在するためか、両方とも表示されるようです
Unicode絵文字と被っている場合でも両方サジェストされる
Unicode絵文字の方しかサジェストされない
* Model and OS of the device(s): any * Browser: any * Server URL: https://misskey.niri.la/ * Misskey: 2024.3.1-kinel.4
* Installation Method or Hosting Service: * Misskey: * Node: * PostgreSQL: * Redis: * OS and Architecture:
The text was updated successfully, but these errors were encountered:
オートコンプリートでの絵文字の検索結果 matched は Map<string, EmojiStore> で管理されているのですが、Unicode絵文字もカスタム絵文字も同じキー (文字列) で扱われているので同一の絵文字と判定されるようです。 クエリに一致する絵文字を検索する過程で上書きされてしまっているようですね。
matched
Map<string, EmojiStore>
misskey/packages/frontend/src/scripts/search-emoji.ts
Line 24 in 78ff90f
Unicode絵文字の場合 name は vs、new などになります:
name
vs
new
misskey/packages/frontend/src/components/MkAutocomplete.vue
Line 70 in 78ff90f
カスタム絵文字も前後のコロンがない vs や new などになります:
Line 95 in 78ff90f
検索に使用される emojiDb ではUnicode絵文字のほうが後の要素となるので、カスタム絵文字が一致してsetされる→Unicode絵文字も一致して上書きされるといった流れのようです。
emojiDb
set
Line 115 in 78ff90f
EmojiDef['aliasOf']やEmojiDef['name']の代わりにEmojiDef['emoji']をキーとして使うように変更してみたところいい感じに動きました。 EmojiDef['emoji']にはUnicode絵文字の場合は絵文字がそのまま、カスタム絵文字の場合は:emoji_name:のようにコロンで囲まれた文字列が入るので区別できます。
EmojiDef['aliasOf']
EmojiDef['name']
EmojiDef['emoji']
:emoji_name:
(1番上の候補がカスタム絵文字の :new:、2番目が🆕です)
:new:
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
💡 Summary
タイトル通りです。
例えば、
:vs:
というカスタム絵文字がある場合、これは🆚と被っているため、サジェストでは:vs:
が表示されず、🆚のみになります。入力後のテキストにおいて、
:vs:
と🆚は別物であるため、両方サジェストされて欲しいと思います。絵文字ピッカーの場合は、Unicode絵文字とカスタム絵文字のサジェストがそれぞれ独立して存在するためか、両方とも表示されるようです
🥰 Expected Behavior
Unicode絵文字と被っている場合でも両方サジェストされる
🤬 Actual Behavior
Unicode絵文字の方しかサジェストされない
📝 Steps to Reproduce
💻 Frontend Environment
🛰 Backend Environment (for server admin)
Do you want to address this bug yourself?
The text was updated successfully, but these errors were encountered: