Skip to content

regression: quick-reaction emojis rendered larger on message toolbar - #41535

Merged
dionisio-bot[bot] merged 1 commit into
release-8.7.0from
regression/quick-reaction-emoji-size
Jul 23, 2026
Merged

regression: quick-reaction emojis rendered larger on message toolbar#41535
dionisio-bot[bot] merged 1 commit into
release-8.7.0from
regression/quick-reaction-emoji-size

Conversation

@KevLehman

@KevLehman KevLehman commented Jul 23, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Since #39411 (native emoji renderer), quick-reaction emojis on the message toolbar render at 1.375rem instead of 1.125rem.

#39411 removed the small-variant css-in-js override in EmojiElement (width/height: 1.125rem) and replaced sprite sizing with a single global rule .rcx-button .emoji { font-size: 1.375rem }, which also hits the small IconButtons on the toolbar.

This restores the small-variant sizing in the new font-size scheme, scoped to small icon buttons (.rcx-button--small-square), covering custom emojis as well. Emoji picker (medium buttons), message body emojis and reaction pills are unaffected.

Steps to test or reproduce

  1. Open any room and send some emojis (👍 ❤️ 😄)
  2. Hover a message to show the message toolbar
  3. Quick-reaction emojis should render at 1.125rem (18px), matching the toolbar icon size

Further comments

image

Review in cubic

https://rocketchat.atlassian.net/browse/CORE-2461

Summary by CodeRabbit

  • Style
    • Improved emoji picker display by supporting a smaller emoji size for compact layouts.
    • Preserved existing emoji preview, removal, and sanitization behavior.

@dionisio-bot

dionisio-bot Bot commented Jul 23, 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 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ffc3ba6

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 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

EmojiElement now applies a component-scoped smaller font size to the rendered emoji when its small prop is enabled.

Changes

Emoji rendering

Layer / File(s) Summary
Conditional small emoji styling
apps/meteor/client/views/composer/EmojiPicker/EmojiElement.tsx
Imports css, defines a smaller .emoji font size, and conditionally passes the style class to IconButton.

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

Possibly related PRs

Suggested labels: type: bug

Suggested reviewers: martinschoeler, tassoevan

🚥 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 clearly describes the main regression fix: quick-reaction emojis were too large on the message toolbar.
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-2461: 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 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.59%. Comparing base (76d8910) to head (c7bbb92).
⚠️ Report is 1 commits behind head on release-8.7.0.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-8.7.0   #41535      +/-   ##
=================================================
- Coverage          68.59%   68.59%   -0.01%     
=================================================
  Files               4138     4138              
  Lines             159415   159415              
  Branches           28188    28174      -14     
=================================================
- Hits              109351   109344       -7     
  Misses             44934    44934              
- Partials            5130     5137       +7     
Flag Coverage Δ
unit 70.55% <ø> (-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.

@dougfabris
dougfabris force-pushed the regression/quick-reaction-emoji-size branch from 7e155b2 to ffc3ba6 Compare July 23, 2026 22:12
Co-authored-by: Kevin Aleman <kevin.aleman@rocket.chat>
@dougfabris
dougfabris force-pushed the regression/quick-reaction-emoji-size branch from ffc3ba6 to c7bbb92 Compare July 23, 2026 22:12
@dougfabris dougfabris added this to the 8.7.0 milestone Jul 23, 2026
@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Jul 23, 2026
@dionisio-bot dionisio-bot Bot added stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider and removed stat: QA assured Means it has been tested and approved by a company insider labels Jul 23, 2026
@dougfabris
dougfabris marked this pull request as ready for review July 23, 2026 22:13
@dougfabris
dougfabris requested a review from a team as a code owner July 23, 2026 22:13
@dionisio-bot
dionisio-bot Bot merged commit a0134b9 into release-8.7.0 Jul 23, 2026
11 of 13 checks passed
@dionisio-bot
dionisio-bot Bot deleted the regression/quick-reaction-emoji-size branch July 23, 2026 22:14

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/meteor/client/views/composer/EmojiPicker/EmojiElement.tsx`:
- Line 32: Update the EmojiElement props handling to destructure the
caller-provided className and explicitly combine it with smallEmojiClass when
small is enabled. Ensure the merged class is applied after spreading the
remaining props so caller classes are preserved without overriding the small
emoji styling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cff317fc-d140-49ab-8294-7f3cbad3538a

📥 Commits

Reviewing files that changed from the base of the PR and between 76d8910 and c7bbb92.

📒 Files selected for processing (1)
  • apps/meteor/client/views/composer/EmojiPicker/EmojiElement.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Hacktron Security Check
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{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:

  • apps/meteor/client/views/composer/EmojiPicker/EmojiElement.tsx
🧠 Learnings (2)
📚 Learning: 2026-03-27T14:52:56.865Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 39892
File: apps/meteor/client/views/room/contextualBar/Threads/Thread.tsx:150-155
Timestamp: 2026-03-27T14:52:56.865Z
Learning: In Rocket.Chat, there are two different `ModalBackdrop` components with different prop APIs. During review, confirm the import source: (1) `rocket.chat/fuselage` `ModalBackdrop` uses `ModalBackdropProps` based on `BoxProps` (so it supports `onClick` and other Box/DOM props) and does not have an `onDismiss` prop; (2) `rocket.chat/ui-client` `ModalBackdrop` uses a narrower props interface like `{ children?: ReactNode; onDismiss?: () => void }` and handles Escape keypress and outside mouse-up, and it does not forward arbitrary DOM props such as `onClick`. Flag mismatched props (e.g., `onDismiss` passed to the fuselage component or `onClick` passed to the ui-client component) and ensure the usage matches the correct component being imported.

Applied to files:

  • apps/meteor/client/views/composer/EmojiPicker/EmojiElement.tsx
📚 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:

  • apps/meteor/client/views/composer/EmojiPicker/EmojiElement.tsx
🔇 Additional comments (1)
apps/meteor/client/views/composer/EmojiPicker/EmojiElement.tsx (1)

1-1: LGTM!

Also applies to: 15-19


return (
<IconButton
{...(small && { className: smallEmojiClass })}

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

file="apps/meteor/client/views/composer/EmojiPicker/EmojiElement.tsx"
if [ -f "$file" ]; then
  echo "== file exists =="
  wc -l "$file"
  echo "== outline =="
  ast-grep outline "$file" || true
  echo "== relevant source =="
  sed -n '1,140p' "$file" | cat -n
else
  echo "file not found: $file"
  echo "candidate files:"
  fd -i 'EmojiElement\.tsx$|EmojiPicker' .
fi

echo "== search EmojiElement usages =="
rg -n "EmojiElement|EmojiPicker|smallEmojiClass|smallEmoji" . --glob '*.{ts,tsx,js}' || true

Repository: RocketChat/Rocket.Chat

Length of output: 30602


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

node - <<'JS'
const smallEmojiClass = 'smallEmojiClass';

const createProps = ({ className, onClick = () => {}, small }) => {
  const props = {};
  if (className) props.className = className;
  if (onClick) props.onClick = onClick;

  const { emoji, image, ...rest } = props;
  return (
    small && { className: smallEmojiClass },
    rest
  );
};

console.log(JSON.stringify(createProps({ className: 'caller-class', small: true }), null, 2));
console.log(JSON.stringify(createProps({ className: 'another-class other-class', small: true }), null, 2));
console.log(JSON.stringify(createProps({ small: true }), null, 2));
JS

Repository: RocketChat/Rocket.Chat

Length of output: 244


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "== Fusion IconButton declarations/usages =="
rg -n "function IconButton|const IconButton|export .*IconButton|IconButton" packages apps --glob '*.{ts,tsx,js}' -g '!*emoji/EmojiElement*' | head -200

echo "== likely fuselage source candidates =="
fd -i 'IconButton' packages apps .

Repository: RocketChat/Rocket.Chat

Length of output: 29497


Merge the generated class with caller-provided className.

Spreading {...props} after small && { className: smallEmojiClass } lets a passed className overwrite smallEmojiClass, so small can fail to apply the 1.125rem emoji size. Destructure className and explicitly merge both classes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/meteor/client/views/composer/EmojiPicker/EmojiElement.tsx` at line 32,
Update the EmojiElement props handling to destructure the caller-provided
className and explicitly combine it with smallEmojiClass when small is enabled.
Ensure the merged class is applied after spreading the remaining props so caller
classes are preserved without overriding the small emoji styling.

.emoji {
font-size: 1.125rem;
}
`;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just curious, do you think we should also have one for custom emojis?

.emoji--custom {
		width: 1.125rem;
		height: 1.125rem;
	}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Screenshot 2026-07-24 at 3 50 31 AM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes!

@dougfabris dougfabris Jul 23, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh yeah, maybe we gonna need that 😫

ricardogarim pushed a commit that referenced this pull request Jul 27, 2026
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.

5 participants