chore: Update JoyPixels emoji icons#38098
chore: Update JoyPixels emoji icons#38098shreeya-methuku wants to merge 1 commit intoRocketChat:developfrom
Conversation
- Updates emoji-toolkit from v7.0.1 to v9.0.0 - Adds support for newer Unicode emojis Closes RocketChat#31069
|
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 |
🦋 Changeset detectedLatest commit: 44f5c84 The changes in this PR will be included in the next version bump. This PR includes changesets to release 40 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughUpdates emoji-toolkit dependency from version ^7.0.1 to ^9.0.0 in the Meteor application's package.json file, documented via a new changeset file for patch release tracking. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @apps/meteor/package.json:
- Line 196: Your package.json currently pins "emoji-toolkit": "^9.0.0" but the
codebase still uses legacy emojione identifiers (e.g., emoji.packages.emojione,
".emojione" CSS classes and old data structures/aliases and relies on APIs like
toShort()); either downgrade the dependency to a compatible v7/v8 in
package.json or update the code to the v9 API by renaming references from
emoji.packages.emojione to emoji.packages.joypixels, replace CSS selectors
".emojione" with the new ".emoji" (or v9 equivalent), and refactor any emoji
data-loading/mapping logic to match v9’s reorganized
categories/aliases/shortname structures and available methods.
📜 Review details
Configuration used: Organization 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 (2)
.changeset/long-mirrors-prove.mdapps/meteor/package.json
🔇 Additional comments (1)
.changeset/long-mirrors-prove.md (1)
1-5: LGTM! Changeset correctly documents the dependency update.The changeset format is correct and appropriately categorizes this as a patch-level change for the
@rocket.chat/meteorpackage, with a clear description of the emoji-toolkit version bump.
| "ejson": "^2.2.3", | ||
| "emailreplyparser": "^0.0.5", | ||
| "emoji-toolkit": "^7.0.1", | ||
| "emoji-toolkit": "^9.0.0", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check npm registry for emoji-toolkit version 9.0.0 availability
echo "=== Checking npm registry for emoji-toolkit v9.x versions ==="
curl -s https://registry.npmjs.org/emoji-toolkit | jq -r '.versions | keys[] | select(startswith("9."))' | sort -V
echo -e "\n=== Checking if v9.0.0 specifically exists ==="
curl -s https://registry.npmjs.org/emoji-toolkit/9.0.0 | jq -r '.version, .dist.tarball' 2>/dev/null || echo "Version not found or error occurred"
echo -e "\n=== Checking recent versions ==="
curl -s https://registry.npmjs.org/emoji-toolkit | jq -r '.versions | keys[]' | tail -20Repository: RocketChat/Rocket.Chat
Length of output: 414
🌐 Web query:
emoji-toolkit v9.0.0 breaking changes release notes changelog
💡 Result:
Summary — emoji-toolkit v9.0.0
- Brought the toolkit up to date with JoyPixels 9.0 (Emoji set) and Unicode 15.1. [1]
- See the GitHub release notes for v9.0.0 (short entry: "This update brings the toolkit up to date with JoyPixels 9.0, Unicode 15.1"). [1]
- Related JoyPixels 9.0 design/emoji changes (Emoji 15.1 support, many redesigned emojis and flag format changes) are documented on the JoyPixels/Emojipedia posts. [2]
- npm package info for emoji-toolkit (shows v9.0.x series). [3]
Links / sources
[1] GitHub — joypixels/emoji-toolkit releases (v9.0.0 entry). (github.com)
[2] JoyPixels / JoyPixels 9.0 (Emoji 15.1 changelog / blog). (blog.emojipedia.org)
[3] npm package page for emoji-toolkit (versions / release info). (npmjs.com)
If you want, I can extract the exact files changed in the v9.0.0 tag (diff), or paste the full release text/assets.
Citations:
- 1: https://github.com/joypixels/emoji-toolkit/releases
- 2: https://blog.emojipedia.org/joypixels-9-0-emoji-changelog/?utm_source=openai
- 3: https://www.npmjs.com/package/emoji-toolkit?utm_source=openai
🏁 Script executed:
#!/bin/bash
# Check how emoji-toolkit is being used in the codebase
echo "=== Searching for emoji-toolkit imports and usage ==="
rg "emoji-toolkit|emojione" --type js --type ts -l
echo -e "\n=== Checking package.json for current emoji-toolkit version ==="
grep -A2 -B2 "emoji-toolkit" apps/meteor/package.jsonRepository: RocketChat/Rocket.Chat
Length of output: 1663
🌐 Web query:
emoji-toolkit v7 to v9 API breaking changes migration guide
💡 Result:
Here’s a concise migration checklist and the important breaking changes when moving emoji-toolkit (JoyPixels) from v7 → v9, with links to the project sources to verify details.
Quick summary (actionable items)
- Update package and names: replace any legacy "emojione" identifiers with "joypixels" / emoji-toolkit (library was rebranded). Install emoji-toolkit@^9.0.0. [1][2]
- Data file changes: adopt the newer emoji JSON structure (categories.json, subcategory added; sort_order is globally unique). Update any code that assumed the old CSV/column names or earlier JSON layouts. [2][3]
- Shortname / alias changes: some primary shortnames were renamed (many older shortnames moved into aliases). Update lookups that assume a particular primary shortname. Use the alias list in emoji JSON to maintain backwards compatibility. [2]
- Unicode / sequence handling: newer versions add many Unicode sequences (skin tones, gender combos, new emoji). Ensure your parser recognizes non-qualified/qualified sequences and uses the toolkit’s output codepoint attributes if you rely on native Unicode generation. [2]
- API/class renames: if you used emojione-specific class/file names, switch to JoyPixels/emoji-toolkit equivalents per the UPGRADE docs. Search your code for "emojione" and replace. [1]
- Asset paths / image sets: file names/paths and available image sets (PNG/sprites) may differ between releases — verify your build/static asset references and update to the v9 image set if you host images locally or change CDN paths. [1][3]
- Behavior changes to expect: newer releases update emoji mapping (aliases, shortnames), and add/modify fields (e.g., subcategory). Run integration tests that cover: shortname → emoji lookup, unicode generation, image URL generation, skin-tone combinations, and replacement in HTML/text. [2][3]
Minimal migration steps
- Upgrade package:
- npm: npm install emoji-toolkit@^9 --save. Verify package version. [3]
- Grep/replace legacy identifiers:
- Replace "emojione" occurrences with "joypixels" / "emoji-toolkit" in your codebase and build scripts. [1]
- Update data handling:
- Load categories.json (new) and update any code that relied on previous CSV column names (alpha_code → alpha_code/aliases, etc.). Adjust for subcategory and global sort_order. [2]
- Update shortname lookups:
- If you relied on specific primary shortnames, consult emoji.json / aliases to map old shortnames to the new primary shortnames. Prefer resolving via aliases array to maintain compatibility. [2]
- Test Unicode sequences & skin tones:
- Validate that composite sequences (ZWJ, skin tone modifiers) are handled correctly and that your native output generation uses the toolkit’s output codepoint attributes when needed. [2]
- Verify assets:
- Update image/sprite URLs and licensing if you use JoyPixels artwork (verify free vs. paid license per your usage). [1][3]
- Run full regression on emoji-related features.
References
- emoji-toolkit (JoyPixels) repository (README / UPGRADE doc / files). [1]
- yarn/npm changelog and release notes showing v8 changes and data-structure changes (aliases, categories). [2][4]
- npm package page for emoji-toolkit (current versions and install instructions). [3]
If you want, I can:
- produce a repo-wide codemod (sed/ts-morph) to rename identifiers and update asset paths,
- or generate a short script to map old shortnames → new primary shortnames using the toolkit’s emoji.json. Which would you prefer?
Sources
[1] joypixels/emoji-toolkit — GitHub repository (README + UPGRADE).
[2] emoji-toolkit changelog / package history (yarn/npm changelog entries showing v8/v7 notes).
[3] emoji-toolkit — npm package page (current versions & install info).
🏁 Script executed:
#!/bin/bash
# Check a few key files to understand how emoji-toolkit is actually being used
echo "=== Checking emoji-toolkit type definitions ==="
cat ee/packages/pdf-worker/src/types/emoji-toolkit.ts
echo -e "\n=== Checking main emoji-emojione library usage ==="
head -50 apps/meteor/app/emoji-emojione/server/lib.ts
echo -e "\n=== Checking emoji parser usage ==="
head -50 apps/meteor/app/emoji/client/emojiParser.tsRepository: RocketChat/Rocket.Chat
Length of output: 3560
emoji-toolkit v9.0.0 requires substantial refactoring—current integration is incompatible with the breaking changes.
Version 9.0.0 exists and is stable, but the upgrade introduces major breaking changes that are not reflected in the current codebase:
- Rebranding & naming: Library renamed from "emojione" to "joypixels"/"emoji-toolkit". The codebase still references
emoji.packages.emojione, expects.emojioneCSS classes, and uses legacy "emojione" identifiers throughout. - Data structure changes: Categories, aliases, and shortname mappings were reorganized. The current code assumes the old structure.
- API surface: The type definitions only expose
toShort(), but no comprehensive API definition exists to verify compatibility with the broader emoji-toolkit v9 API.
Before merging, either:
- Revert to emoji-toolkit v7 (or v8) until a full migration to emoji-toolkit v9 is planned, or
- Implement the breaking changes: rename
emoji.packages.emojione→emoji.packages.joypixels, update CSS class selectors (.emojione→.emoji), and refactor emoji data loading to match the v9 structure.
No active security vulnerabilities were found for v9.0.0.
🤖 Prompt for AI Agents
In @apps/meteor/package.json at line 196, Your package.json currently pins
"emoji-toolkit": "^9.0.0" but the codebase still uses legacy emojione
identifiers (e.g., emoji.packages.emojione, ".emojione" CSS classes and old data
structures/aliases and relies on APIs like toShort()); either downgrade the
dependency to a compatible v7/v8 in package.json or update the code to the v9
API by renaming references from emoji.packages.emojione to
emoji.packages.joypixels, replace CSS selectors ".emojione" with the new
".emoji" (or v9 equivalent), and refactor any emoji data-loading/mapping logic
to match v9’s reorganized categories/aliases/shortname structures and available
methods.
|
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 🙌 |
Proposed changes
Updates the
emoji-toolkitdependency from v7.0.1 to v9.0.0, which includes support for newer Unicode 15.1 emojis.Note:
After investigating the codebase, I found that a complete emoji update would require more extensive changes:
emojionepackageemojione-*prefix (would need to change tojoypixels-*)apps/meteor/app/emoji-emojione/would need refactoringThis PR updates the
emoji-toolkitpackage version as a first step. Full migration may require additional work.Issue(s)
Closes #31069
Steps to test
yarnto install dependenciesChecklist
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.