Skip to content

chore: remove emojione in favor of native emojis#39411

Draft
sampaiodiego wants to merge 19 commits intodevelopfrom
remove-joypixel
Draft

chore: remove emojione in favor of native emojis#39411
sampaiodiego wants to merge 19 commits intodevelopfrom
remove-joypixel

Conversation

@sampaiodiego
Copy link
Copy Markdown
Member

@sampaiodiego sampaiodiego commented Mar 6, 2026

Replace Emojione with Native Unicode Emojis

Summary

This PR removes the dependency on Emojione and transitions Rocket.Chat to use native Unicode emojis across the platform. All emojis will now be stored and processed as standard Unicode characters directly in the database.

Why this change

Emojione introduced an additional abstraction layer (shortcodes + image mapping) that increases complexity, impacts performance, and limits interoperability with modern protocols.

By adopting native Unicode emojis, we align Rocket.Chat with current standards used across messaging platforms and protocols.

Performance Improvements

  • Reduced payload size: Unicode emojis are significantly smaller than image-based representations or shortcode mappings.
  • Faster rendering: Native emojis are rendered directly by the client/OS, eliminating image lookups and replacements.
  • Lower processing overhead: No need for parsing, conversion, or maintaining emoji dictionaries.
  • Database efficiency: Storing raw Unicode reduces storage complexity and improves query performance.

Improved Compatibility (Matrix & Open Protocols)

  • Matrix-native support: Matrix uses Unicode emojis by default. This change ensures seamless compatibility with Matrix federation.
  • No translation layer needed: Eliminates the need to convert between Emojione shortcodes and Matrix events.
  • Better interoperability: Messages retain their original emoji representation across federated systems and external clients.
  • Standards alignment: Moves Rocket.Chat closer to protocol-native communication without proprietary transformations.

Developer & Maintenance Benefits

  • Simplifies the codebase by removing emoji parsing/mapping logic
  • Reduces dependency on third-party emoji libraries
  • Easier to maintain and extend
  • Fewer edge cases when handling emoji rendering across platforms

Migration Notes

  • Existing messages using Emojione shortcodes will NOT be converted to their corresponding Unicode equivalents.
  • Emojis will now be different in each OS.
  • Custom emojis remain unaffected.

Result

A simpler, faster, and more interoperable emoji system that:

  • Improves performance across clients and backend
  • Reduces technical debt
  • Enables cleaner Matrix federation
  • Aligns Rocket.Chat with modern messaging standards

CORE-1980

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Mar 6, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 6, 2026

⚠️ No Changeset found

Latest commit: 3e18036

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 6, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 319bebf1-33f6-4802-81cf-fd17d066e1fb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 98.68185% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.94%. Comparing base (44938fd) to head (3e18036).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #39411      +/-   ##
===========================================
+ Coverage    70.55%   70.94%   +0.39%     
===========================================
  Files         3271     3272       +1     
  Lines       116782   118248    +1466     
  Branches     21090    21077      -13     
===========================================
+ Hits         82393    83889    +1496     
+ Misses       32338    32311      -27     
+ Partials      2051     2048       -3     
Flag Coverage Δ
e2e 60.53% <84.35%> (+0.02%) ⬆️
e2e-api 48.08% <ø> (-0.05%) ⬇️
unit 71.50% <99.05%> (+0.52%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ggazzo
Copy link
Copy Markdown
Member

ggazzo commented Mar 6, 2026

@copilot when inserting an emoji using the picker or autocomplete, use the UTF-8 encoding unless it's a custom emoji,
When you're typing and finish the emoji name, also replace it with UTF-8.

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 6, 2026

@ggazzo I've opened a new pull request, #39432, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Member

@MartinSchoeler MartinSchoeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whenever the user adds an emoji using the emoji picker, the result should be an unicode character being added to the message composer, only show the shortcode as fallback for custom emojis or emojis that don't have an unicode counterpart

Steps to reproduce:

Open emoji picker
Select an emoji

Expected behavior:

An unicode emoji character should be added. (Example 🙈)

Actual behavior:

A shortname is added. (Example 🙈)

@ggazzo
Copy link
Copy Markdown
Member

ggazzo commented Mar 9, 2026

Whenever the user adds an emoji using the emoji picker, the result should be an unicode character being added to the message composer, only show the shortcode as fallback for custom emojis or emojis that don't have an unicode counterpart

Steps to reproduce:

Open emoji picker Select an emoji

Expected behavior:

An unicode emoji character should be added. (Example 🙈)

Actual behavior:

A shortname is added. (Example 🙈)

@copilot

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 9, 2026

@ggazzo I've opened a new pull request, #39474, to work on those changes. Once the pull request is ready, I'll request review from you.

sampaiodiego and others added 19 commits April 7, 2026 10:46
Replace the emojione-based emoji rendering with a new native Unicode
emoji module. Uses emojibase for shortname-to-unicode mapping and
renders emojis as native characters with a standard emoji font stack.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Delete entire emoji-emojione module (CSS sprites, config, templates)
- Remove emojione sprite PNGs (~6.4MB of assets)
- Update all imports to use the new emoji-native module
- Replace emojione.shortnameToUnicode with emojibase-backed utility
- Update emoji picker, tone selector, and parser for native rendering
- Update federation-matrix to use emojibase for emoji conversion
- Remove emoji-toolkit from pdf-worker, render unicode directly
- Remove emojione type declarations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove emojione, emoji-toolkit, emojione-assets from all packages
- Add emojibase and emojibase-data as replacements
- Update eslint and stylelint ignore patterns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update federation e2e tests to use .emoji class instead of .emojione
- Update reaction unit test description

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…hortcode (#39474)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ggazzo <5263975+ggazzo@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

5 participants