-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-01-04] [$500] Android - Chat - Message gets displayed from right to left #30584
Comments
Triggered auto assignment to @johncschuster ( |
Job added to Upwork: https://www.upwork.com/jobs/~01278feafdf81fcb73 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
This comment was marked as resolved.
This comment was marked as resolved.
For android it will be working like that it is mentioned in comment. Also this can be seen for other apps like linkedin where the web version is having the desired result and their android app is not showing it in LTR format |
Hm... @HardikChoudhary24 I see your comment, but I think this is still a bug. I guess we can keep this open and see if we can get a concrete fix in place? |
Sure @allroundexperts but this is something that is not supported in android as per my knowledge. This can be seen in other apps like LinkedIn, discord, and Puma. These are the ones that I have tested and found that they are displaying it in the desired format on web but not on native android. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Chat - Message gets displayed from right to left What is the root cause of that problem?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. What changes do you think we should make in order to solve the problem?The best solution is to add \u2066 unicode character before starting to write, I suggest verifying (when the user is using Android) if the input value is empty and doing the next in the ComposerWithSuggestions component:
The convertToLTR function adds the unicode character needed for this to work in Android.
This way the input in Android never changes to direction = RTL, please see the result: Android.chat.messgage.gets.displayed.from.right.to.left.done.mov |
Proposal |
@allroundexperts can you take a look at the updated proposal above when you get a moment? |
@johncschuster, @allroundexperts Whoops! This issue is 2 days overdue. Let's get this updated quick! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@samilabud's proposal seems to work well. @HardikChoudhary24 did you explore this solution before? If so, do you know if it has some shortcomings? cc @situchan as well since you seem to have been involved in that conversation. |
ProposalPlease re-state the problem that we are trying to solve in this issue.The text is displayed right to left. What is the root cause of that problem?The ReactRoot view default textDirection is https://developer.android.com/reference/android/view/View.html#attr_android:textDirection
Testing textDirection: firstStrong and textDirection: ltr on Androidhttps://developer.android.com/reference/android/view/View.html#attr_android:textDirection
What changes do you think we should make in order to solve the problem?Expose textDirection style prop in the React Native API to allow changing the Views (View, TextInput, Text) textDirection.
|
@johncschuster, @allroundexperts Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Payment Summary:@samilabud - $500 - paid via Upwork (Contributor) |
Original PR was reverted due to regression and 2nd PR is still in review |
@tgolen, @samilabud, @johncschuster, @allroundexperts Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Sorry I missed that, @situchan. Thanks for raising the PR under review! |
PR to fix the regression is still under review |
Regression fix PR is still under review. |
^Same |
Same |
I bumped the PR to see what's going on with this one. The PR hasn't been updated in a month. |
Thanks for doing that, @tgolen! It hadn't occurred to me to bump the PR. I'll do that myself going forward. |
Sounds good! Yep, commenting on the PRs as the BZ person to try and figure out what's going on is always fair game. Hopefully, we will get a response. Next step if we don't is to ping them on Slack or NewDot and try to get a response directly. |
@allroundexperts thanks for the reminder about that thread. I think it's probably best to close this for now until we decide we want to have full support for RTL languages. There would be a whole host of things we would need to consider such as:
I will go ahead and close this for now. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.3.93-0
**Reproducible in staging?:**Y
**Reproducible in production?:**Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Issue found when executing PR #30521
Action Performed:
Expected Result:
Verify that the content gets displayed from left to right
Actual Result:
The content gets displayed from right to left
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Bug6256757_1698673344303.30521_Android.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @johncschusterThe text was updated successfully, but these errors were encountered: