Skip to content

Conversation

@sarafarajnasardi
Copy link

content: Render large emoji in emoji-only paragraphs

Summary

This PR updates the message rendering to display paragraphs containing only emojis (Unicode or custom image emojis) at a larger size. This brings the mobile app's presentation into parity with the web app.

To support this, MessageImageEmoji has been updated to derive its size from the ambient text style rather than a fixed pixel value, ensuring custom emojis scale proportionally with the font size.

Screenshots

Before After
Before After

Changes

  • Detection: Added logic to identify paragraphs that consist solely of emojis and whitespace.
  • Styling: Applied a 2× font scaling to DefaultTextStyle for these paragraphs.
  • Components: Refactored MessageImageEmoji to respect the ambient fontSize, enabling it to grow when the parent paragraph's font size increases.

References

Fixed Issues

Fixes: #1995

@chrisbobbe
Copy link
Collaborator

Hi, welcome! This PR will need test coverage for the feature before we can review it.

@sarafarajnasardi
Copy link
Author

Thanks! I'll work on adding the test coverage and will push an update shortly.

@sarafarajnasardi sarafarajnasardi force-pushed the emoji-only-messages-at-larger-size branch from f39d122 to 4f19586 Compare December 6, 2025 03:34
@sarafarajnasardi
Copy link
Author

I have added the tests coverage

When a message consists of a single paragraph containing only emojis
(Unicode or custom image emojis) and whitespace, render them at a
larger size.

This brings the mobile app's presentation into parity with the web
app.

To support this, `MessageImageEmoji` is updated to derive its size
from the ambient text style rather than a fixed 20px value. This
ensures custom emojis scale proportionally with the increased font
size.

Fixes: zulip#1995
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.

Show emoji-only messages at larger size

2 participants