-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix emoji only is cut off if wrapped with markdown and contains whitespaces #53707
base: main
Are you sure you want to change the base?
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/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop