fix: migrate emoji support from emojione to emoji-toolkit (Unicode 16)#37082
fix: migrate emoji support from emojione to emoji-toolkit (Unicode 16)#37082Sarthakkad05 wants to merge 1 commit intoRocketChat:developfrom
Conversation
|
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
WalkthroughReplaced all imports of the deprecated emojione package with emoji-toolkit across server and client code. Updated TypeScript module declaration to target emoji-toolkit. Bumped emoji-toolkit dependency versions in multiple package.json files and removed emojione-related devDependencies. No public APIs or control flow were changed. Changes
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
|
This PR fixes the outdated emoji picker by migrating from emojione → emoji-toolkit, adding support for Unicode 13–16 emojis (e.g., 🪓).
This resolves #24917 Would love a review when you get a chance — thanks! |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts (1)
6-6: Remove outdated emojione workaround and TODO comment
The referenced issue (#617) still exists in the emojione repo (HTTP 200) and there’s no corresponding issue in emoji-toolkit. Delete the// TODO remove fix below when issue is solved: https://github.com/joypixels/emojione/issues/617line and its associated workaround now that we’ve fully migrated.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (14)
apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts(1 hunks)apps/meteor/app/emoji-emojione/server/callbacks.ts(1 hunks)apps/meteor/app/emoji/client/lib.ts(1 hunks)apps/meteor/app/lib/server/lib/sendNotificationsOnMessage.ts(1 hunks)apps/meteor/client/sidebar/RoomList/normalizeSidebarMessage.ts(1 hunks)apps/meteor/client/sidebarv2/RoomList/normalizeSidebarMessage.ts(1 hunks)apps/meteor/client/views/navigation/lib/normalizeNavigationMessage.ts(1 hunks)apps/meteor/definition/externals/emoji-toolkit.d.ts(1 hunks)apps/meteor/package.json(1 hunks)apps/meteor/server/services/federation/infrastructure/matrix/converters/room/MessageReceiver.ts(1 hunks)ee/apps/omnichannel-transcript/package.json(1 hunks)ee/apps/queue-worker/package.json(1 hunks)ee/packages/omnichannel-services/package.json(1 hunks)ee/packages/pdf-worker/package.json(1 hunks)
🔇 Additional comments (14)
apps/meteor/server/services/federation/infrastructure/matrix/converters/room/MessageReceiver.ts (1)
1-1: LGTM! Correctly migrating from emojione to emoji-toolkit.The import change from
emojionetoemoji-toolkitis correct and aligns with the broader migration across the codebase. The API methodstoShortandshortnameToUnicoderemain compatible between the libraries.Based on learnings: EmojiOne has rebranded to JoyPixels, and the upgrade path is documented with details on what's new when migrating from emojione.
ee/apps/omnichannel-transcript/package.json (1)
33-33: LGTM! Dependency upgraded to support Unicode 16 emojis.The upgrade from
^7.0.1to^9.0.1is appropriate and aligns with the project-wide migration to emoji-toolkit for Unicode 13-16 support.Based on learnings: The 9.0.1 version brings the toolkit up to JoyPixels 9.0 and Unicode 15.1 support, providing access to newer emoji glyphs and sequences.
ee/packages/omnichannel-services/package.json (1)
29-29: LGTM! Consistent emoji-toolkit version upgrade.The upgrade from
^7.0.1to^9.0.1maintains consistency with other packages in the migration and provides Unicode 15.1 support.Based on learnings: This version includes sync with JoyPixels 9.0 artwork and Unicode 15.1 support for new emoji glyphs and sequences.
apps/meteor/client/views/navigation/lib/normalizeNavigationMessage.ts (1)
3-3: LGTM! Import correctly updated for emoji-toolkit migration.The migration from
emojionetoemoji-toolkitis correct. TheshortnameToUnicodeAPI method remains compatible between libraries, so the existing logic at Line 10 will continue to work as expected.Based on learnings: All references to "emojione" in class names and file names have been changed during the EmojiOne to JoyPixels rebrand, and sprite filenames have changed from emojione- to joypixels-.
apps/meteor/app/lib/server/lib/sendNotificationsOnMessage.ts (1)
11-11: LGTM! Correct emoji library import update.The import change from
emojionetoemoji-toolkitis appropriate and maintains API compatibility. All usage sites ofemojione.shortnameToUnicode(Lines 185, 190, 191) will continue working seamlessly with emoji-toolkit.Based on learnings: The emoji-toolkit provides the same API patterns like
shortnameToUnicode(str)that were available in emojione, ensuring backward compatibility.ee/apps/queue-worker/package.json (1)
29-29: LGTM! Upgraded to latest emoji-toolkit with Unicode 15.1 support.The upgrade from
^7.0.1to^9.0.1brings emoji-toolkit up to Unicode 15.1, adding support for newer emojis as mentioned in the PR objectives.Based on learnings, verify that the upgrade doesn't break existing emoji processing:Based on the search results, version 9.0.1 is a small PHP regex patch for Unicode 15.1, while 9.0.0 brought the toolkit up to date with JoyPixels 9.0 and Unicode 15.1. The core APIs appear to be backward compatible based on learnings.
apps/meteor/definition/externals/emoji-toolkit.d.ts (1)
1-2: LGTM! Module declaration updated correctly.The TypeScript module declaration has been properly updated from
emojionetoemoji-toolkitwith the namespace alias changed toemojiToolkit. The API surface remains consistent.apps/meteor/app/emoji/client/lib.ts (1)
2-2: LGTM! Import updated to emoji-toolkit.The import has been correctly updated from
emojionetoemoji-toolkit. The usage on Line 18 (emojione.toImage) remains unchanged, indicating API compatibility.apps/meteor/client/sidebarv2/RoomList/normalizeSidebarMessage.ts (1)
3-3: LGTM! Import migrated to emoji-toolkit.The import has been correctly updated from
emojionetoemoji-toolkit. The usage on Line 10 (emojione.shortnameToUnicode) maintains the same API, ensuring backward compatibility.apps/meteor/app/emoji-emojione/server/callbacks.ts (1)
1-1: LGTM! Import migration properly executed.The import change from
emojionetoemoji-toolkitis correctly implemented. The API usage remains consistent withemojione.shortnameToUnicode, which maintains backward compatibility during the migration.apps/meteor/client/sidebar/RoomList/normalizeSidebarMessage.ts (1)
3-3: LGTM! Consistent migration pattern.The import replacement from
emojionetoemoji-toolkitis properly executed. The usage pattern on Line 10 continues to work as expected with the new library.apps/meteor/app/emoji-emojione/lib/getEmojiConfig.ts (2)
1-1: LGTM! Import successfully migrated.The import change from
emojionetoemoji-toolkitis correctly implemented while maintaining the same variable name and API usage throughout the file.
9-164: Validate custom emoji definitions after migrating to emoji-toolkit@9.0.1
Ensure TM, ©, ®, digit_*, pound and asterisk emojis aren’t already provided by the new library and remove any redundant overrides.apps/meteor/package.json (1)
346-346: LGTM! Library version properly updated with no security concerns.The emoji-toolkit upgrade to version ^9.0.1 is secure with no direct vulnerabilities found and represents the latest stable release. Version 9.0.1 was published approximately a year ago, providing good stability while adding Unicode 15.1 support as mentioned in the PR objectives.
Based on learnings: The upgrade to emoji-toolkit 9.0.1 provides JoyPixels 9.0 artwork and Unicode 15.1 support, which aligns perfectly with the PR goal of supporting newer emoji sets including Unicode 13-16 emojis.
| "@rocket.chat/fuselage-tokens": "~0.33.2", | ||
| "emoji-assets": "^7.0.1", | ||
| "emoji-toolkit": "^7.0.1", | ||
| "emoji-toolkit": "^9.0.1", |
There was a problem hiding this comment.
🧩 Analysis chain
LGTM! Consistent emoji-toolkit upgrade.
The upgrade from ^7.0.1 to ^9.0.1 aligns with the repository-wide migration to the latest emoji-toolkit version.
Note that Line 39 still references @types/emojione in devDependencies. This should be updated or removed as part of the migration:
🏁 Script executed:
#!/bin/bash
# Check if @types/emojione is still used anywhere in the pdf-worker code
fd -e ts -e tsx --exec grep -l "emojione" {} \; | head -10Length of output: 726
Update or remove @types/emojione
BigEmojiBlock.tsx and EmojiSpan.tsx (ee/packages/pdf-worker) still import/refer to “emojione”; migrate these to emoji-toolkit (or remove) before dropping the @types/emojione devDependency.
|
Closing this PR in favor of #39411, where we’re replacing Emojione with native Unicode emojis. It’s still a draft, and we’d love help from the community to get it across the finish line 🙌 |
Closes: #24917
Summary:
This PR fixes the outdated emoji picker in Rocket.Chat by replacing the legacy emojione and emojione-assets packages with the modern emoji-toolkit. This ensures full support for Unicode 13–16 emojis, including recently added emojis like 🪓.
Changes:
Testing / Verification:
Impact:
Summary by CodeRabbit