Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Make lonely emojis bigger #3738

Merged
merged 4 commits into from
Jun 24, 2021
Merged

Feature: Make lonely emojis bigger #3738

merged 4 commits into from
Jun 24, 2021

Conversation

rdjuric
Copy link
Contributor

@rdjuric rdjuric commented Jun 23, 2021

Details

Increases the fontSize of the ReportActionItemFragment of type COMMENT when it's composed of a single emoji. To do that, we:

  1. Add a new style: singleEmojiText, with custom fontSize and lineHeight
  2. Add a new const: a regex expression to match emojis CONST.REGEX.EMOJIS
  3. Create isSingleEmoji, a function that validates if a string is composed of a single emoji
  4. In the ReportActionItemFragment we check if the COMMENT passes our isSingleEmoji validation. If it passes, we use the singleEmojiText style instead of our default.

Fixed Issues

Fixes #3712

Tests

  1. Open any conversation.
  2. Send a message composed of a single emoji.
  3. Send a second message composed of multiple emojis (or emoji + text)
  4. The lonely emoji on the first message is bigger.

QA Steps

  1. Open any conversation.
  2. Send a message composed of a single emoji.
  3. Send a second message composed of multiple emojis (or emoji + text)
  4. The lonely emoji on the first message should be bigger.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Web.mov

Mobile Web

mWeb.mp4

Desktop

desktop.mov

iOS

iOS.mp4

Android

android.mp4

@rdjuric rdjuric requested a review from a team as a code owner June 23, 2021 23:21
@MelvinBot MelvinBot requested review from robertjchen and removed request for a team June 23, 2021 23:22
@rdjuric rdjuric marked this pull request as draft June 24, 2021 00:17
@rdjuric rdjuric marked this pull request as ready for review June 24, 2021 01:09
@rdjuric
Copy link
Contributor Author

rdjuric commented Jun 24, 2021

Just a note: while #3730 isn't fixed, the only way to test this is by sending messages while offline.

src/libs/ValidationUtils.js Outdated Show resolved Hide resolved
src/CONST.js Show resolved Hide resolved
@rdjuric rdjuric requested a review from robertjchen June 24, 2021 15:01
Copy link
Contributor

@robertjchen robertjchen left a comment

Choose a reason for hiding this comment

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

Looks great, thank you!

@robertjchen robertjchen merged commit cef11b7 into Expensify:main Jun 24, 2021
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging in version: 1.0.73-4🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production in version: 1.0.74-0🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

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.

New Feature: Make lonely emojis bigger in E.cash
4 participants