-
Notifications
You must be signed in to change notification settings - Fork 54
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
RTL Support #388
Comments
Thanks for the suggestion. I think to support RTL would just be to reverse the headers and tabs within the dockview containers which I have quickly attempted and shown in the below screenshot? Would you agree with this / expect any further additions to support RTL? Referered in sandbox example here. |
Well, I guess as I see in the header you are already using flex and this is better than floating elements, so all we need is just add direction rtl to the parent or even to the body tag, we need to test that in inner components content, but I guess it will work fine |
The problem is in the content structure itself as every component has position absolute and using left attribute, then if we have a button to switch direction, the content and the header for every component will work fine, but the problem will be that the panel 1 will still be in the left which is not the correct structure for the RTL direction of the components, so I guess there should be a property for example in the initialization 'isRTL' and its value should be boolean, if it is true then all components should be using right instead of left in the styles handled through the TS code. In addition this should be dynamically working like if I switch the direction the library should be reinitialized or updated |
@mathuo Is this being worked on? I will gladly submit a PR for this if possible, will probably take me a couple of weeks |
In terms of what would need to change for RTL I believe it requries the tab header bar to reverse as in the first screenshot and the work still required would be as @muhamed87 suggested to position everything using Do you see other parts that would also need to change? |
I don't know, haven't gotten to check it yet, but generally every part that considers a side (e.g using @muhamed87 's suggestion for using a property should be good enough. |
The solution should match the following image, as discussed before with @mathuo , not only the header will be reflected, but also the containers, so if the orange container with its header was on left side in LTR version, it should be on the right side in the RTL version |
Hi @mathuo , I would appreciate if you can tell me if it's ok for me to work on it or will you work on it? Thanks |
@NaNgets Sorry, yes I am happy for you to look into this if you have the time. From what I can gather this is the pieces that need to be completed to fully support RTL mode.
I can comment up these points with pointers to relavent files etc if that helps, otherwise any questions you have just let me know and I can try and explain the existing code. |
Is there any plan for RTL support for this amazing library?
It is highly recommended as I think, and it will be a great addition to the library
The text was updated successfully, but these errors were encountered: