-
-
Notifications
You must be signed in to change notification settings - Fork 861
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
refactor: changed style to minimum support of RTL language #768
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Awesome, this will make the job much easier in RTL projects. Thanks in advance |
It will be awesome 👌 |
Thanks so much for submitting this! I'm going to need a little more time than I have this morning to get it fully reviewed, but it's on my list.
Would you mind elaborating on these ones? What's blocking them from being updated? Should we open up separate tickets to track each one separately? Lastly, what advice do you have for someone who's only familiar with LTR to develop and test to make sure RTL is done (and remains implemented) properly? Thanks again! |
@claviska Finally, I should say yes you should make separate tickets per component to fix the functionality there. but before that, we should choose a way to know the components in the RTL mode. I prefer this will be, a property with the Rtl name that is reflected in dom. because developers should be choosing a way to know Rtl and it's not our business. the developer put the |
Can we use the built-in global Within CSS, this lets us use If that's agreeable, I can work that out. Now that this is merged, let's open individual issues to address any remaining RTL issues. This will help us track them more closely and it will give others an opportunity to submit PRs. Two things I noticed when testing:
I'll open separate issues for these shortly. Edit: some button group styles had to be reverted, as they were breaking button groups and radio buttons. See 707aeb6 for details. |
By the way, if anyone wants to submit a translation: https://github.com/shoelace-style/shoelace/tree/next/src/translations I believe the only RTL language we currently have at the moment is Hebrew. |
@claviska I do this |
I decided to treat WIth that, I was able to fix the tooltip's position in Unless there are objections to this approach, we can use this approach for solving bugs in other components where logical properties aren't sufficient. |
I've updated Tab Group as well. 70c97e2 At this point, the mechanism for detecting RTL in a component has been established, so any outstanding bugs can be filed as new issues. This will allow anyone to track and contribute fixes. Thanks again for everyone's help with this! |
Regarding breadcrumbs, what needs to happen here? Do we need to swap the icons from |
OK, range, badge, progress bar, rating, and tab group have been updated. I believe I've fixed all the issues mentioned above except for three last items:
You can try them out by swapping the I'm out of time for today, but I'll work on the last two issues very soon. If you notice anything else, please let me know! |
@claviska I thought that for symbols used in |
Yes, exactly the icon should be changed or rotated. I don't know which one is better. @claviska |
Commit d0ff2fe fixes breadcrumb, tab group, and split panel, including keyboard controls and mouse resizing. Please take a look in I believe that's all the RTL bugs that have been identified. If you notice anything else, please post a new issue. And one last very big THANK YOU for this PR! |
This was a bit more complicated because I'm cloning the separator to improve DX. (Instead of the user having to place a custom separator on each breadcrumb item, they can place one in breadcrumb and the component clones it.) I was reluctant to simply flip it using CSS. This technique works for simple icons such as chevrons and arrows, but it won't work for custom icons that aren't symmetric or have text or details that require a certain orientation. Instead, I'm using |
#191
I tried to make a better style with minimum support for RTL language, but many things can't be handled by CSS and I couldn't fix all bugs in RTL language.
bellow components still have bugs:
However, by merging this pull request, many style bugs in the RTL language will be fixed.