Skip to content

Handle Zulip's encoding of Unicode emoji in messages #58

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

Closed
gnprice opened this issue Apr 8, 2023 · 0 comments · Fixed by #245
Closed

Handle Zulip's encoding of Unicode emoji in messages #58

gnprice opened this issue Apr 8, 2023 · 0 comments · Fixed by #245
Labels
a-content Parsing and rendering Zulip HTML content, notably message contents
Milestone

Comments

@gnprice
Copy link
Member

gnprice commented Apr 8, 2023

In rendering messages, we should handle this feature: https://zulip.com/help/emoji-and-emoticons#add-emoji-to-a-message

We already (since #4) handle the case where the emoji is an image emoji (i.e., either a realm custom emoji or the Zulip extra emoji, which is :zulip:). The remaining case is where the emoji is a Unicode emoji.

Rough steps to implement this:

  • Add more detail to UnicodeEmojiNode, so that it records the sequence of Unicode code points expressed in the CSS class names.
  • When building a widget for a UnicodeEmojiNode, show that emoji. Options include:
    • Show that sequence of code points as literal Unicode text, and rely on system fonts to render it. This is what the RN app currently does.
    • Show that sequence of code points as literal Unicode text, and ship a font (like Noto Color Emoji) to render it.
    • Ship the glyphs for the different emojisets, as images. This is what the web app effectively does. (It's actually one image file used as a spritesheet for all the emoji, because that's the way to do it efficiently on web. It's possible that would be the efficient way to do it in Flutter too.)
@gnprice gnprice added the m-beta label May 26, 2023
@gnprice gnprice added this to the Beta milestone May 27, 2023
@gnprice gnprice added a-content Parsing and rendering Zulip HTML content, notably message contents and removed m-beta labels May 27, 2023
gnprice pushed a commit to rajveermalviya/zulip-flutter that referenced this issue Aug 24, 2023
- Parse the zulip emoji code class names to unicode codepoints
- Generate a TextSpan for each unicode emoji
- Remove fallback emoji name container

Fixes: zulip#58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-content Parsing and rendering Zulip HTML content, notably message contents
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant