-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add Custom Emojis with Unicode Private User Area with a new font #59301
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
Conversation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 similar comment
|
|
e95f08a to
0aa1640
Compare
|
|
|
|
|
|
|
|
|
@eVoloshchak would you please do a final review 🙇 |
|
@c3024, we call |
I’ve looked into this, and from what I found and understood, it’s not a problem. The regex is lightweight and the check should be performant. I haven’t seen any issues during testing on high-traffic accounts. That said, I also pushed changes to memoize the usage to avoid unnecessary repeated calls.
The existing fonts in the app don’t include emojis, and standard emojis are rendered natively by the platform. Including the custom emojis directly in the existing fonts could have avoided this additional styling, but we decided to avoid that approach. On native platforms, a specific font must be applied to text—fallbacks don’t work. So we need to explicitly apply the custom font only to the custom emojis. If we applied this font to all strings, non-emoji text would fall back to the system font, which would break our styles. I don’t think there’s anything wrong with the custom font itself, and we can’t embed these conditional styles directly into the font. |
|
On iOS too. Are you checking with the latest Adhoc build? |
|
@c3024, could you check this in a phone simulator too? |
|
iPad OS 18.3.2 |
|
Approving, but will wait on @eVoloshchak's confirmation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't see this bug on a physical device, but it's definitely there on a Simulator, which is weird.
Approving as it works as expected on a real device
|
Gonna merge these then! Great work on this @c3024 and thank you for thoroughly testing this @eVoloshchak |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.1.80-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.1.80-8 🚀
|





Explanation of Change
This PR implements Custom Emojis using the Private User Area Unicodes. This is part of #54643 implementation in which we add a custom emoji font containing :global_create: emoji. Two fonts
CustomEmojiWebFont.ttxandCustomEmojiNativeFont.ttxare created with private user area codes allotted to different SVGs withnanoemoji. The fonts are added as per this document.Emoji regex was updated on
expensify-common. Hybrid [PR]https://github.com/Expensify/Mobile-Expensify/pull/13570) for adding these fonts here.Fixed Issues
$ #54643
PROPOSAL: https://expensify.slack.com/archives/C07HPDRELLD/p1742914747461099?thread_ts=1742275825.663609&cid=C07HPDRELLD
MOBILE-EXPENSIFY: https://github.com/Expensify/Mobile-Expensify/pull/13570
Tests
:globalin the composer.:global_create:in the composer.:global_create:and this emoji with some text.Offline tests
Same as tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
globalCreateAndroid.mov
Android: mWeb Chrome
globalCreateAndroidmWeb.mov
iOS: Native
globalCreateiOS.mov
customEmojiiOS.mov
iOS: mWeb Safari
globalCreateiOSmWeb.mov
MacOS: Chrome / Safari
globalCreateChrome.mov
MacOS: Desktop
globalCreateDesktop.mov