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
feat: Add RTL Support for widget and portal. #9275
base: develop
Are you sure you want to change the base?
Conversation
…in user interface widgets
Implement dynamic layout direction handling for enhanced RTL support …
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.
Hey @nawafinity I can see that you have made changes to the translation files as well in this PR. It would be great if you could make those changes in a separate PR. Also in case you want to update translations, you can do them here: https://translate.chatwoot.com/
@nawafinity is this ready for test? I could help. @scmmishra it would've been great to have text direction settings in widget and kb portal. This way I can keep my chatwoot UI in English and have the chat widget correctly set to RTL. |
i like this feature to be merged its so useful ! |
Hey @scmmishra, I will make these changes this week and finalize this PR. @hadifarnoud, it’s almost ready. I’m currently running some tests and preparing to update the branch. This PR will be finalized as soon as possible. Thank you, |
Pull Request Template
Description
This pull request introduces RTL (Right-To-Left) support to widgets and portals, ensuring compatibility with languages that utilize RTL layouts. It features the introduction of a new
rtlMixin
specifically designed for widgets, alongside updates to the existingrtlMixin
for the dashboard. This update leverages Tailwind CSS's utility classes for dynamic layout direction based on thedir
attribute.e.g.:
A new Ruby initializer (
~/config/initializers/i18n_extensions.rb
) has been added to automatically set the document language and direction.Supported languages include:
ar
(Arabic)arc
(Aramaic)dv
(Divehi)fa
(Persian)ha
(Hausa)he
(Hebrew)khw
(Khowar)ks
(Kashmiri)ku
(Kurdish)ps
(Pashto)ur
(Urdu)yi
(Yiddish)Fixes #7407 #7141
Examples:
Type of change
How Has This Been Tested?
This feature was tested in a local development environment using unit tests to verify that changes correctly apply RTL styles based on the
dir
attribute. Manual testing was also performed to ensure that widgets and portals render appropriately in supported RTL languages.Checklist: