Skip to content
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

chore(docs): add rtl support #273

Merged
merged 6 commits into from
Oct 31, 2023
Merged

chore(docs): add rtl support #273

merged 6 commits into from
Oct 31, 2023

Conversation

gustaveWPM
Copy link
Contributor

@gustaveWPM gustaveWPM commented Oct 29, 2023

Hello.
I've added a documentation page about RTL support, as we previously discussed here: #220

I've documented two possible implementations.
However, the second, proposing an implementation based on a useEffect call, seems to be a bad choice, after some rethinking.

I've written the documentation for it anyway in this PR, but I think we should remove it because of the point I mentioned in "Caveat".

Note that this choice of implementation will cause an UI flickering when your user loads your web pages for the first time.
This is because the page will first be mounted with the default dir attribute value of your HTML node, then updates when the component including the useEffect is mounted. This will introduce CLS (Cumulative Layout Shift) issues.

As a reminder, we thought this might be a good idea here:

Thanks in advance for your review and for your feedback.

Closes #220

@vercel
Copy link

vercel bot commented Oct 29, 2023

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

Name Status Preview Comments Updated (UTC)
next-international ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2023 9:01am

@gustaveWPM
Copy link
Contributor Author

I had to proofread my contribution several times and refine it a little.
I think I'm OK on my side for a review.

Copy link
Owner

@QuiiBz QuiiBz left a comment

Choose a reason for hiding this comment

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

Thanks! Here are a few suggestions, mostly about the code examples:

docs/pages/docs/rtl-support.mdx Show resolved Hide resolved
docs/pages/docs/rtl-support.mdx Outdated Show resolved Hide resolved
docs/pages/docs/rtl-support.mdx Outdated Show resolved Hide resolved
docs/pages/docs/rtl-support.mdx Outdated Show resolved Hide resolved
docs/pages/docs/rtl-support.mdx Outdated Show resolved Hide resolved
gustaveWPM and others added 2 commits October 30, 2023 09:38
Co-authored-by: Tom Lienard <tom.lienrd@gmail.com>
Co-authored-by: Tom Lienard <tom.lienrd@gmail.com>
Co-authored-by: Tom Lienard <tom.lienrd@gmail.com>
Copy link
Owner

@QuiiBz QuiiBz left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@QuiiBz QuiiBz changed the title chore(docs): add rtl support (#220) chore(docs): add rtl support Oct 31, 2023
@QuiiBz QuiiBz merged commit 0170ad2 into QuiiBz:main Oct 31, 2023
5 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.

Add documentation for <html> tag dir attribute
2 participants