-
-
Notifications
You must be signed in to change notification settings - Fork 50.8k
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: added rtl direction to all of ant-design components #19380
Conversation
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.
Could you please add tests to make sure this change works as expected?
Deploy preview for ant-design ready! Built with commit 9c56ca7 |
Codecov Report
@@ Coverage Diff @@
## 4.0-prepare #19380 +/- ##
===============================================
+ Coverage 97.49% 97.54% +0.04%
===============================================
Files 294 294
Lines 6716 6771 +55
Branches 1847 1862 +15
===============================================
+ Hits 6548 6605 +57
+ Misses 168 166 -2
Continue to review full report at Codecov.
|
I have no idea why lint fails, there is no error on my environment. |
|
@saeedrahimi I check this page every day! Kindly ask you to finish it. |
@saeedrahimi, |
I thought that config-provider demo page is not suitable to demonstrate all |
Great works, I hope that the owner can pay enough attention to this and like your contribution. |
Cool. I'm OK with this if all the components support RTL. |
Note that some components have been refactored to a new major version in |
thanks for note, i will double check them to ensure components working correctly. |
Thank you @zombieJ for fixing my mistakes 👍 |
Amazing works! |
thank you how i can use this in nuxt and vue? |
I think @zombieJ fixed it in this commit cause i see header in correct order in next.ant.design |
Could you help to fix it to correct order? |
That's fine. I've resolved. |
Amazing work @vahidalvandi ❤ |
@PejmanNik Feel free to open a new issue about that. |
how to make Sider in right side (rtl)? |
@adirrapidapi |
@xrkffgg I added with configProvider the rtl direction but the sider it's still in left side, as you can see in this example https://stackblitz.com/edit/react-ouxpra-trwwbf?embed=1&file=index.js |
@xrkffgg any solution? |
sorry, I just saw. I'll fix it. |
@saeedrahimi i have issue on nextjs
|
@mehdiraized Please create new issue https://github.com/ant-design/ant-design/issues/new/choose |
🤔 This is a ...
🔗 Related issue link
close #4051
Previous pull request was on
feature
branch: #18006💡 Background and solution
As requirement of this issue components of ant-design doesn't support right to left direction, and those components are not useful in some languages like Persian(Farsi) or Arabic.
Solution:
I started to develop Rtl style on ant-design and as @zombieJ mentioned in issue i used ConfigProvider to set direction of component.
direction property added to ConfigProvider.
in style files added prefixed rtl styles to change direction of displayed items
so when RTL'ed components wrapped by ConfigProvider with
direction='rtl'
property, all child components (also grid-system) will shown in right-to-left direction.RTL Progress
📝 Changelog
☑️ Self Check before Merge
View rendered components/config-provider/demo/direction.md
View rendered components/config-provider/index.en-US.md
View rendered components/config-provider/index.zh-CN.md