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

BUG: codeblock on RTL locale puts copy button on the left while code is also on the left #8792

Closed
6 of 7 tasks
YoniChechik opened this issue Mar 19, 2023 · 5 comments
Closed
6 of 7 tasks
Labels
bug An error in the Docusaurus core causing instability or issues with its execution domain: theme Related to the default theme components

Comments

@YoniChechik
Copy link
Contributor

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

codeblock on RTL locale puts copy button on the left while code is also on the left.

This is my current hack to fix this

/*RTL hack! the copy botton of CodeBlock is set incorrectly, thiis is how to fix it*/
/*for dev*/
.buttonGroup_node_modules-\@docusaurus-theme-classic-lib-theme-CodeBlock-Content-styles-module {
  left: 0.5rem !important;
  right: unset !important;
}
/*for prod*/
.buttonGroup__atx {
  left: 0.5rem !important;
  right: unset !important;
}

Reproducible demo

No response

Steps to reproduce

some RTL local with code block

Expected behavior

copy button shold stay on the right

Actual behavior

copy button is on the left

Your environment

No response

Self-service

  • I'd be willing to fix this bug myself.
@YoniChechik YoniChechik added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Mar 19, 2023
@Josh-Cena Josh-Cena added domain: theme Related to the default theme components and removed status: needs triage This issue has not been triaged by maintainers labels Mar 19, 2023
@Vishruta-Patil
Copy link
Contributor

@Josh-Cena Can I work on this issue ?

@Josh-Cena
Copy link
Collaborator

@Vishruta-Patil Yes, you can directly send a PR

@Vishruta-Patil
Copy link
Contributor

@Josh-Cena I have setup the project locally but can you tell me where can I find RTL locale with the code block.

@Josh-Cena
Copy link
Collaborator

You need to start the website with an RTL locale, such as fa or ar. You need to modify the config file and then run start with --locale ar.

@Josh-Cena
Copy link
Collaborator

Fixed by #8803. @Vishruta-Patil next time, please read the PR template carefully. There's a checklist item that asks you to fill in the issue number you are fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution domain: theme Related to the default theme components
Projects
None yet
Development

No branches or pull requests

3 participants