-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
fix(theme): fix copy of indented code blocks, replace copy-text-to-clipboard by clipboard API #11422
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 tasks
7 tasks
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: +284 B (0%) Total Size: 12.1 MB ℹ️ View Unchanged
|
⚡️ Lighthouse report for the deploy preview of this PR
|
|
Size Change: +274 B (0%) Total Size: 12.5 MB ℹ️ View Unchanged
|
This was referenced Sep 23, 2025
CristianLara
added a commit
to CristianLara/botorch
that referenced
this pull request
Sep 23, 2025
Summary: We recently noticed that the copy feature on our website codeblocks were excluding indentation. There's a github issue on the docusaurus repo tracking this facebook/docusaurus#11414 with a fix that was just merged today facebook/docusaurus#11422. To avoid waiting until their next release we have two options: 1. update our website package.json to use a docusaurus canary until they release 3.9 2. swizzle the relevant docusaurus code and fix it ourselves using their well documented api. There's an example of another project replacing this same logic that we can use. Though it will become unnecessary once docusaurus 3.9 releases We're going with option (1) here and upgrading Docusaurus to version 3.8.1-canary-6401 across Ax and BoTorch. The docusaurus team releases canaries regularly and are what they use to build their website. https://docusaurus.io/community/canary Differential Revision: D83068096
CristianLara
added a commit
to CristianLara/Ax
that referenced
this pull request
Sep 23, 2025
Summary: We recently noticed that the copy feature on our website codeblocks were excluding indentation. There's a github issue on the docusaurus repo tracking this facebook/docusaurus#11414 with a fix that was just merged today facebook/docusaurus#11422. To avoid waiting until their next release we have two options: 1. update our website package.json to use a docusaurus canary until they release 3.9 2. swizzle the relevant docusaurus code and fix it ourselves using their well documented api. There's an example of another project replacing this same logic that we can use. Though it will become unnecessary once docusaurus 3.9 releases We're going with option (1) here and upgrading Docusaurus to version 3.8.1-canary-6401 across Ax and BoTorch. The docusaurus team releases canaries regularly and are what they use to build their website. https://docusaurus.io/community/canary Differential Revision: D83068096
facebook-github-bot
pushed a commit
to facebook/Ax
that referenced
this pull request
Sep 23, 2025
Summary: X-link: meta-pytorch/botorch#3021 Pull Request resolved: #4340 We recently noticed that the copy feature on our website codeblocks were excluding indentation. There's a github issue on the docusaurus repo tracking this facebook/docusaurus#11414 with a fix that was just merged today facebook/docusaurus#11422. To avoid waiting until their next release we have two options: 1. update our website package.json to use a docusaurus canary until they release 3.9 2. swizzle the relevant docusaurus code and fix it ourselves using their well documented api. There's an example of another project replacing this same logic that we can use. Though it will become unnecessary once docusaurus 3.9 releases We're going with option (1) here and upgrading Docusaurus to version 3.8.1-canary-6401 across Ax and BoTorch. The docusaurus team releases canaries regularly and are what they use to build their website. https://docusaurus.io/community/canary Reviewed By: mpolson64 Differential Revision: D83068096 fbshipit-source-id: d88084af7f58803d798e7f4348e028053e1f3012
facebook-github-bot
pushed a commit
to meta-pytorch/botorch
that referenced
this pull request
Sep 23, 2025
Summary: Pull Request resolved: #3021 X-link: facebook/Ax#4340 We recently noticed that the copy feature on our website codeblocks were excluding indentation. There's a github issue on the docusaurus repo tracking this facebook/docusaurus#11414 with a fix that was just merged today facebook/docusaurus#11422. To avoid waiting until their next release we have two options: 1. update our website package.json to use a docusaurus canary until they release 3.9 2. swizzle the relevant docusaurus code and fix it ourselves using their well documented api. There's an example of another project replacing this same logic that we can use. Though it will become unnecessary once docusaurus 3.9 releases We're going with option (1) here and upgrading Docusaurus to version 3.8.1-canary-6401 across Ax and BoTorch. The docusaurus team releases canaries regularly and are what they use to build their website. https://docusaurus.io/community/canary Reviewed By: mpolson64 Differential Revision: D83068096 fbshipit-source-id: d88084af7f58803d798e7f4348e028053e1f3012
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This library is now useless (sindresorhus/copy-text-to-clipboard#35) since the clipboard API is now widely supported: https://caniuse.com/mdn-api_clipboard_writetext
Some Docusaurus sites have already switched and never looked back: hasura/ddn-docs#489
So this is reasonable to remove it entirely in the next minor, no need to wait for v4. If anyone complains, we can still restore it.
Also fix bug in the lib's latest version: #11414
Test Plan
CI + preview
Works fine in Chrome, Safari, Firefox
Test links
https://deploy-preview-11422--docusaurus-2.netlify.app/