-
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
Fixed regression Android - Chat - Message gets displayed from right to left #33721
Fixed regression Android - Chat - Message gets displayed from right to left #33721
Conversation
@allroundexperts 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] |
@samilabud Conflicts! |
Done!, thank you for letting me know, I hadn't noticed 😅. |
Hi @samilabud! This is still not working as expected. Please check below. Screen.Recording.2024-01-14.at.1.31.53.AM.mov |
Thanks for testing!, I have fixed the -at/@- regex to take into consideration the mention/searching, please double check: Testing.chat.form.right.to.left.-.mention.search.mp4 |
Reviewing again tomorrow. |
@samilabud I am still seeing the following two errors: Screen.Recording.2024-01-25.at.5.49.21.AM.movScreen.Recording.2024-01-25.at.5.49.45.AM.movAt this point, since we have gone back and forth across this several times now, I think its not worth spending more of our time on this. |
@allroundexperts I understand your point and I'm sorry for this back and forth, in my defense according to my tests of the first video bug can be reproduced in the Main branch, and the second is because the colon character was not in the list of allowed not to convert the input to RTL, if there are more characters like @ or : that trigger other events would be good to know to add them all to the list. Result with the colon added: Colon.added.mov |
Another bug @samilabud: Screen.Recording.2024-02-01.at.2.30.53.AM.mov |
OMG 😣, it's fixed now. Note: This strange behavior was happening even with @ (when tagging), because the LTR conversion was being called twice because the regular expression was only being taken into account for when to start writing in the composer. Result: Chat.to.LTR.test.fixed.mp4 |
What's the status of this PR? Are there any plans to finish it? |
This can be closed given we've closed the issue as well. |
Hi @samilabud! |
Details
The root cause is that Android only converts RTL text to LTR text using Unicode controls and by default, when you start writing in a language that is written in RTL mode it converts the input text to RTL.
Here we are fixing this regression, this was caused because we did not take into consideration when the composer load for the first time and the user started writing with @, we include the @ in the regular expression list to validate if the composer can be converted to LTR.
Fixed Issues
$ #30584
PROPOSAL: #30584 (comment)
Tests
Offline tests
N/A
QA Steps
Test 1.
Test 2.
Test 3.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.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 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
regression.test.-.android.-.reduced.mp4
Android: mWeb Chrome
regression.test.-.chrome.android.mov
iOS: Native
regression.test.-.iphone.mov
iOS: mWeb Safari
regression.test.-.safari.iphone.mov
MacOS: Chrome / Safari
regression.test.-.chrome.mac.-.reduced.mp4
MacOS: Desktop
regression.test.-.mac.desktop.mov