Fix emoji only is cut off if wrapped with markdown and contains whitespaces#53707
Conversation
|
@ZhenjaHorbach Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
I haven't added the screenshot yet because I realize that after adding the emoji line-height to the I tried reproducing this on plain HTML and it happens too. The div will have a bigger height. The solution to this is to move the font-size from the spans to the div (from the individual emoji renderer to the comment tag). However, that means the whitespace will have a font-size of 30px too. I want to confirm whether it's fine or not because actually, if we send emojis without markdown and see it on native, the whitespace already has the font-size of 30px because we applied it to the whole text, so applying the solution above will make it consistent between markdown and plain-text. App/src/pages/home/report/comment/TextCommentFragment.tsx Lines 114 to 116 in dac90e1 |
|
I will check today ! |
|
@bernhardoj |
|
I don't mind about consistent ! |
|
@bernhardoj does this mean that in order to keep a consistent line height we'll have a bigger whitespace between emojis? |
|
Each emoji has a bigger line height (35) and font size (30). When we apply the line height (35) to the whole element, the whole element will have a bigger height, as shown in my comment here. To fix that, we need to add a bigger font size (30) to the whole element too, which affects the whitespace too. This causes a bigger whitespace, but it actually matches the behavior when the emojis are not rendered as a markdown. |
@youssef-lr |
|
I think it's worth having the @Expensify/design take a look here. Could you guys take a look at the comment above please? |
|
I tend to agree with this statement here:
|
Nice @bernhardoj |
|
@ZhenjaHorbach updated |
|
Thanks |
Reviewer Checklist
Screenshots/Videos |
|
LGTM ! |
|
@youssef-lr |
|
@bernhardoj |
|
Done |
Thanks ! |
|
✋ 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/youssef-lr in version: 9.0.84-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.84-7 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.84-7 🚀
|










Explanation of Change
Fixed Issues
$ #53546
PROPOSAL: #53546 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
😸 😄)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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop