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

feat(v2): add support for RTL direction #4140

Merged
merged 14 commits into from
Feb 10, 2021
Merged

feat(v2): add support for RTL direction #4140

merged 14 commits into from
Feb 10, 2021

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Feb 1, 2021

Motivation

Do not merge this PR util facebookincubator/infima#61 is approved.

Adding support for the dir tag is mainly to allow RTL direction.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Not ready yet.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@lex111 lex111 added the pr: new feature This PR adds a new API or behavior. label Feb 1, 2021
@lex111 lex111 requested a review from slorber as a code owner February 1, 2021 10:18
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Feb 1, 2021
@lex111 lex111 changed the title feat(v2): add support for RTL feat(v2): add support for RTL direction Feb 1, 2021
@netlify
Copy link

netlify bot commented Feb 1, 2021

[V1] Deploy preview success

Built with commit 0e647a4

https://deploy-preview-4140--docusaurus-1.netlify.app

@github-actions
Copy link

github-actions bot commented Feb 1, 2021

Size Change: +19 B (0%)

Total Size: 156 kB

ℹ️ View Unchanged
Filename Size Change
website/build/assets/css/styles.********.css 17.6 kB 0 B
website/build/assets/js/main.********.js 109 kB +15 B (0%)
website/build/blog/2017/12/14/introducing-docusaurus/index.html 21.7 kB +4 B (0%)
website/build/docs/introduction/index.html 180 B 0 B
website/build/index.html 6.94 kB 0 B

compressed-size-action

@netlify
Copy link

netlify bot commented Feb 1, 2021

Deploy preview for docusaurus-2 ready!

Built with commit 0e647a4

https://deploy-preview-4140--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Feb 1, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 74
🟢 Accessibility 96
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-4140--docusaurus-2.netlify.app/classic/

@slorber
Copy link
Collaborator

slorber commented Feb 1, 2021

Oh that's cool, will try to test that soon! Thanks for working on this

We should rather add this direction to the i18n.localeConfigs because on localized sites you must be able to configure that direction on a per-locale basis:

https://v2.docusaurus.io/docs/next/docusaurus.config.js#i18n

@lex111
Copy link
Contributor Author

lex111 commented Feb 1, 2021

Ah, yes, really makes sense, done.

@slorber
Copy link
Collaborator

slorber commented Feb 5, 2021

Was able to remove the rtl theme overrides from datagit.ir site, add rtl config, and it seems to work

image

Will investigate a bit more on Monday, but it seems pretty good for now!

thanks

@lex111
Copy link
Contributor Author

lex111 commented Feb 6, 2021

We also do not forget to make RTL styles for the built-in Docusaurus components. For achieve this, I suggest using the PostCSS plugin, which will be added via a new hook (see #4185).
In this PR I have already started applied new PostCSS hook, so after that PR is merged, deploy of current PR will be restored.

@slorber
Copy link
Collaborator

slorber commented Feb 10, 2021

Thanks @lex111 that looks good to merge!

Will test it soon on datagit.ir in https://github.com/massoudmaboudi/datagit_v2.docusaurus/pull/2

@slorber slorber merged commit 0ac34b7 into master Feb 10, 2021
@lex111 lex111 deleted the lex111/ltr-support branch February 19, 2021 18:20
@lex111 lex111 added this to the v2.0.0-alpha.71 milestone Mar 1, 2021
This was referenced Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants