Skip to content

regression: fix issues rendering some existing emojis - #41305

Merged
dionisio-bot[bot] merged 3 commits into
developfrom
reg/regional-emoji
Jul 13, 2026
Merged

regression: fix issues rendering some existing emojis#41305
dionisio-bot[bot] merged 3 commits into
developfrom
reg/regional-emoji

Conversation

@MartinSchoeler

@MartinSchoeler MartinSchoeler commented Jul 10, 2026

Copy link
Copy Markdown
Member

Fixes issue with some tones and types not being rendered

Proposed changes (including videos or screenshots)

Issue(s)

CORE-2408

Steps to test or reproduce

Further comments

Review in cubic

Summary by CodeRabbit

  • Bug Fixes

    • Improved recognition of regional indicator emojis, including flag categorization.
    • Expanded support for legacy emoji shortcodes, digits, symbols, and skin-tone variants.
    • Improved conversion of alternate skin-tone names to their corresponding emojis.
    • Enhanced parsing of emoji shortcodes in messages, including standalone and inline usage.
  • Tests

    • Added coverage for regional indicators, legacy aliases, skin tones, symbols, and multi-emoji text.

@dionisio-bot

dionisio-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: dca33a9

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

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a8d710d3-0777-4955-9450-624e49781e6c

📥 Commits

Reviewing files that changed from the base of the PR and between 0b70a73 and dca33a9.

📒 Files selected for processing (4)
  • apps/meteor/app/emoji-native/lib/generateEmojiData.ts
  • apps/meteor/app/emoji-native/lib/legacyEmojioneMap.ts
  • apps/meteor/tests/unit/app/emoji/emojiNativeParser.spec.ts
  • packages/message-parser/tests/emoji.test.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: CodeRabbit / Review
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Hacktron Security Check
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • packages/message-parser/tests/emoji.test.ts
  • apps/meteor/app/emoji-native/lib/legacyEmojioneMap.ts
  • apps/meteor/tests/unit/app/emoji/emojiNativeParser.spec.ts
  • apps/meteor/app/emoji-native/lib/generateEmojiData.ts
**/*.spec.ts

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.spec.ts: Use descriptive test names that clearly communicate expected behavior in Playwright tests
Use .spec.ts extension for test files (e.g., login.spec.ts)

Files:

  • apps/meteor/tests/unit/app/emoji/emojiNativeParser.spec.ts
🧠 Learnings (5)
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.

Applied to files:

  • packages/message-parser/tests/emoji.test.ts
  • apps/meteor/app/emoji-native/lib/legacyEmojioneMap.ts
  • apps/meteor/tests/unit/app/emoji/emojiNativeParser.spec.ts
  • apps/meteor/app/emoji-native/lib/generateEmojiData.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.

Applied to files:

  • packages/message-parser/tests/emoji.test.ts
  • apps/meteor/app/emoji-native/lib/legacyEmojioneMap.ts
  • apps/meteor/tests/unit/app/emoji/emojiNativeParser.spec.ts
  • apps/meteor/app/emoji-native/lib/generateEmojiData.ts
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.

Applied to files:

  • packages/message-parser/tests/emoji.test.ts
  • apps/meteor/app/emoji-native/lib/legacyEmojioneMap.ts
  • apps/meteor/tests/unit/app/emoji/emojiNativeParser.spec.ts
  • apps/meteor/app/emoji-native/lib/generateEmojiData.ts
📚 Learning: 2026-02-24T19:22:48.358Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/omnichannel/omnichannel-send-pdf-transcript.spec.ts:66-67
Timestamp: 2026-02-24T19:22:48.358Z
Learning: In Playwright end-to-end tests (e.g., under apps/meteor/tests/e2e/...), prefer locating elements by translated text (getByText) and ARIA roles (getByRole) over data-qa attributes. If translation values change, update the corresponding test locators accordingly. Never use data-qa locators. This guideline applies to all Playwright e2e test specs in the repository and helps keep tests robust to UI text changes and accessible semantics.

Applied to files:

  • apps/meteor/tests/unit/app/emoji/emojiNativeParser.spec.ts
📚 Learning: 2026-03-06T18:10:15.268Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 39397
File: packages/gazzodown/src/code/CodeBlock.spec.tsx:47-68
Timestamp: 2026-03-06T18:10:15.268Z
Learning: In tests (especially those using testing-library/dom/jsdom) for Rocket.Chat components, the HTML <code> element has an implicit ARIA role of 'code'. Therefore, screen.getByRole('code') or screen.findByRole('code') will locate <code> elements even without a role attribute. Do not flag findByRole('code') as invalid in reviews; prefer using the implicit role instead of adding role="code" unless necessary for accessibility.

Applied to files:

  • apps/meteor/tests/unit/app/emoji/emojiNativeParser.spec.ts
🔇 Additional comments (4)
apps/meteor/app/emoji-native/lib/generateEmojiData.ts (1)

34-38: LGTM!

Also applies to: 64-65, 90-90, 108-125

apps/meteor/app/emoji-native/lib/legacyEmojioneMap.ts (1)

1410-1426: LGTM!

apps/meteor/tests/unit/app/emoji/emojiNativeParser.spec.ts (1)

1-56: LGTM!

packages/message-parser/tests/emoji.test.ts (1)

33-44: LGTM!


Walkthrough

Emoji data generation now supports regional-indicator categorization and multiple skin-tone shortcode aliases. Legacy mappings cover keycap and tone names, with parser tests validating the new resolutions and rendering cases.

Changes

Emoji shortcode compatibility

Layer / File(s) Summary
Native emoji registration
apps/meteor/app/emoji-native/lib/generateEmojiData.ts, apps/meteor/app/emoji-native/lib/legacyEmojioneMap.ts
Regional indicators are assigned to flags, excluded from category primary shortcodes, and skin-tone entries are registered under alternate and fallback keys. Legacy mappings add keycap digit, pound, asterisk, and tone shortcodes.
Emoji parser validation
apps/meteor/tests/unit/app/emoji/emojiNativeParser.spec.ts, packages/message-parser/tests/emoji.test.ts
Tests cover alternate skin-tone names, regional indicators, legacy aliases, unknown shortcode passthrough, multi-shortcode replacement, and inline or standalone parsing.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • RocketChat/Rocket.Chat#39411: Extends the native-emoji migration with related regional-indicator, skin-tone, and legacy shortcode registration.

Suggested labels: type: bug

Suggested reviewers: ricardogarim, tassoevan, gabriellsh

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the regression fix for existing emoji rendering issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • CORE-2408: Request failed with status code 401

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.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.00%. Comparing base (398525a) to head (dca33a9).
⚠️ Report is 13 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41305      +/-   ##
===========================================
+ Coverage    68.97%   69.00%   +0.02%     
===========================================
  Files         3755     3755              
  Lines       147141   147544     +403     
  Branches     26277    26329      +52     
===========================================
+ Hits        101492   101814     +322     
- Misses       41149    41237      +88     
+ Partials      4500     4493       -7     
Flag Coverage Δ
e2e 59.28% <90.90%> (-0.07%) ⬇️
e2e-api 48.99% <ø> (+<0.01%) ⬆️
unit 70.46% <100.00%> (+<0.01%) ⬆️

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.

@MartinSchoeler
MartinSchoeler marked this pull request as ready for review July 10, 2026 19:32
@MartinSchoeler
MartinSchoeler requested a review from a team as a code owner July 10, 2026 19:32

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 4 files

Re-trigger cubic

@MartinSchoeler MartinSchoeler added the stat: QA assured Means it has been tested and approved by a company insider label Jul 13, 2026
@MartinSchoeler MartinSchoeler added this to the 8.7.0 milestone Jul 13, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 13, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Jul 13, 2026
@KevLehman
KevLehman removed this pull request from the merge queue due to a manual request Jul 13, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Jul 13, 2026
Merged via the queue into develop with commit dd4023e Jul 13, 2026
49 checks passed
@dionisio-bot
dionisio-bot Bot deleted the reg/regional-emoji branch July 13, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants