Skip to content

Rtl fix #209

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

Merged
merged 4 commits into from
Aug 5, 2024
Merged

Rtl fix #209

merged 4 commits into from
Aug 5, 2024

Conversation

tasnim0tantawi
Copy link
Contributor

RTL languages should make the some parts of UI displayed from right to left.

 image

Most the edits I did:
style={isRtl(i18n.language) ? { direction: "rtl" } : {}}
Which is changing HTML dir to rtl if the language is one of the known 5 rtl languages.

Copy link

vercel bot commented Aug 4, 2024

@tasnim0tantawi is attempting to deploy a commit to the dottle's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@1ilit 1ilit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk if this absolutely has to be flipped or not but it makes the type pretty difficult to read
image

Maybe we can force it to be 'ltr' all the time. But then it will be inconsistent with the 'type' of Type fields. Let me know what you think.


Also this breaks the resizing of the side panel so please add this to handleResize

    const w = isRtl(i18n.language) ? window.innerWidth - e.clientX : e.clientX;

here:

const w = e.clientX;

Other than that lgtm

<div
className="py-1.5 px-5 flex justify-between items-center rounded-xl my-1 sm:mx-1 xl:mx-6 select-none overflow-hidden toolbar-theme"
style={isRtl(i18n.language) ? { direction: "rtl" } : {}}
>
<div className="flex justify-start items-center">
<LayoutDropdown />
<Divider layout="vertical" margin="8px" />
<Dropdown
style={{ width: "240px" }}
position="bottomLeft"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add this to position just make the dropdowns all consistent

isRtl(i18n.language) ? "bottomRight" : "bottomLeft"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1ilit Thanks so much for the code review, I've learned things! Please check my latest commit. I have addressed the issues you mentioned. Also, I made both field name and data type ltr as they will always be in English.
image

@tasnim0tantawi tasnim0tantawi requested a review from 1ilit August 5, 2024 08:33
Copy link
Member

@1ilit 1ilit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link

vercel bot commented Aug 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
drawdb ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 5, 2024 9:21am

@1ilit 1ilit merged commit c8cdad3 into drawdb-io:main Aug 5, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants