-
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
[$250] Chat - The size of the cursor after emoji differs in mWeb and android. #53827
Comments
Triggered auto assignment to @anmurali ( |
Job added to Upwork: https://www.upwork.com/jobs/~021866908996080563894 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 ( |
Edited by proposal-police: This proposal was edited at 2024-12-11 22:31:19 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.When entering an emoji in the chat composer, the cursor size after the emoji differs between mobile web (mWeb) and Android platforms. Specifically, on mWeb the cursor appears larger than on Android when following an emoji character. What is the root cause of that problem?Based on the logs and code analysis, we found that while emoji characters are correctly styled with a larger font size (30px), the base text input styling (which controls cursor size) remains at the default font size (15px). This discrepancy occurs because:
What changes do you think we should make in order to solve the problem?We should modify the base text input styling in the Composer component to match the emoji font size when the input contains only emojis. This can be done by:
The change should be made in the Composer component since it controls the base text input styling and already has access to the emoji-only state detection. const inputStyleMemo = useMemo(
() => [
StyleSheet.flatten([
style,
{outline: 'none'},
// Add emoji-based font size to base input when content is emoji-only
textContainsOnlyEmojis && {
fontSize: variables.fontSizeOnlyEmojis,
lineHeight: variables.lineHeightXLarge,
},
]),
StyleUtils.getComposeTextAreaPadding(isComposerFullSize),
Browser.isMobileSafari() || Browser.isSafari() ? styles.rtlTextRenderForSafari : {},
scrollStyleMemo,
StyleUtils.getComposerMaxHeightStyle(maxLines, isComposerFullSize),
isComposerFullSize ? {height: '100%', maxHeight: 'none'} : undefined,
textContainsOnlyEmojis && hasMultipleLines ? styles.onlyEmojisTextLineHeight : {},
],
[
style,
styles.rtlTextRenderForSafari,
styles.onlyEmojisTextLineHeight,
scrollStyleMemo,
hasMultipleLines,
StyleUtils,
maxLines,
isComposerFullSize,
textContainsOnlyEmojis,
],
); What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore?
|
Proposal |
will review in couple hours |
ProposalPlease re-state the problem that we are trying to solve in this issue.Chat - The size of the cursor after emoji differs in mWeb and android. What is the root cause of that problem?When we type only emoji characters, they are styled with a larger font size, while the default text size for the composer remains set to 15px. This discrepancy occurs because the What changes do you think we should make in order to solve the problem?To resolve this you need to change in below files:
Here, What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?What alternative solutions did you explore? (Optional)Android Nativeandroid.movAndroid mWebandroid-mWeb.movIOS Nativeios.mp4IOS mWebios-mWeb.mp4Webweb.mov |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Currently i see three different behaviour on web, native apps and mweb i am not sure whilch one is correct Native - enternig empty space will not reset cursor size Screen.Recording.2024-12-19.at.12.24.38.AM.movMweb chrome - first space reset cursor size then if deleted than it does not reset at all Screen.Recording.2024-12-19.at.12.32.49.AM.movWeb- enternig empty space will reset cursor size Screen.Recording.2024-12-19.at.12.33.51.AM.movIMO web one is correct cc @Expensify/design Can anyone please confirm the correct behaviour? |
This makes sense to me too - I think that would be my expectation across all platforms if possible. |
Agree 👍 |
Same 👍 |
@anmurali @ishpaul777 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@anmurali, @ishpaul777 Eep! 4 days overdue now. Issues have feelings too... |
Thank you team! we are still looking for proposals! @kaushiktd @JoshIri360 Please update your proposals to make behaviour consistent across platforms |
I have checked across all the platforms and updated the proposal with recordings. |
There is an existing issue in Safari (both desktop and iOS) where the cursor size does not adjust correctly after an emoji, even if the font size changes. This is due to a long-standing bug in WebKit, where the cursor inherits the line height rather than the actual font size. [See screenshot below for reference – demonstrating font size change but persistent large cursor due to emoji size.]
 Platform Breakdown:
Recording.at.2024-12-25.09.48.05.mp4
Recording.at.2024-12-25.10.07.01.mp4Native App Considerations: Recording.at.2024-12-25.10.28.02.mp4 |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: V9. 0.73-6
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: N
Email or phone of affected tester (no customers): N
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
The size of the cursor after emoji must be same.
Actual Result:
The size of the cursor after emoji differs in mweb and android.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6689463_1733793799518.Screenrecorder-2024-12-10-06-49-13-661_compress_1.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @ishpaul777The text was updated successfully, but these errors were encountered: