-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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: Automate text direction based on the language in messages #29367
Conversation
🦋 Changeset detectedLatest commit: 16bdce7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Can someone please look at this? This is fairly simple although I'm not sure how to get this to RocketChat's attention? Cc @juliajforesti :) |
Can someone please look at this? We really need it |
@anefzaoui Thanks for the contribution! Sorry for the ignorance, but in your opinion, we should align the messages on the right even using an LTR language? |
Hi @dougfabris The dir="auto" attribute is essential for handling mixed language content. It's not about UI design or text alignment per se, instead, it ensures that words in a sentence with both Left-to-Right (LTR like English, French) and Right-to-Left (RTL like Arabic and Hebrew) languages are displayed in their correct order. This attribute lets the browser automatically decide the text direction based on the content, maintaining readability regardless of the overall UI language. Pain points when using a forced or inherited
|
@anefzaoui Thank you so much for your explanation, I will share the content you bring to us with the design team and will think about how we can add some tests in the PR and guarantee the issue doesn't happen in future changes |
@anefzaoui In a discussion with the team we thought we should add this rule for our message composer and our text inputs as well, what do you think? There are other places we should have this rule in your opinion besides the messages? |
Thanks!
Basically this is needed in any place where a user needs to type something & anywhere where users are expected to input text, since the user can type and combination of words. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #29367 +/- ##
===========================================
+ Coverage 49.56% 58.94% +9.37%
===========================================
Files 3309 1780 -1529
Lines 81387 34447 -46940
Branches 16693 7162 -9531
===========================================
- Hits 40338 20304 -20034
+ Misses 36348 12587 -23761
+ Partials 4701 1556 -3145
Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, as your PR is targeted to messages, let's merge it. Feel free to help us to fix the missing places, but I will share this need with the team as well. Thanks a lot!
@dougfabris thanks!! Will do, however is there like a chat server for volunteers or a proper way to notify and recommend such features? if such is available then discussions can be much more detailed and clear than in the comments. |
@anefzaoui You can join us on the Open Server, in the #support channel you can raise a question if needed, also we do have a Community Forum where you can search/create a post. For feature request we do have a repository for it. |
Proposed changes (including videos or screenshots)
This pull request resolves the issue #29365. It ensures that the
dir
attribute for message boxes is set to "auto", anddir="auto"
attribute is added to anydiv
withdata-qa-type="message-body"
. This ensures proper handling of text direction for languages that require RTL orientation.Issue(s)
Fixes #29365
Steps to test or reproduce
Please follow the steps outlined in the issue to test the changes.
Further comments
This change ensures that the Rocket.Chat application correctly handles the text direction for languages that require RTL orientation, improving overall accessibility and usability. I'm not so sure about the correct tests to cover this?