Skip to content

Conversation

@Rajankannaujiya
Copy link

Summary

This PR implements a copy button UI for code blocks across the documentation. It enhances user experience by allowing users to quickly copy code snippets with a single click. Additionally, minor updates were made to the mdx-components.js file to ensure proper integration with the new component.

What kind of change does this PR introduce?

  1. Feature: Adds a reusable CodeBlockWithCopy component.
  2. Docs integration: Updates MDX components to support the copy functionality.

Did you add tests for your changes?

  1. No tests were added for this PR. Future updates may include unit tests and e2e for the copy functionality.

Does this PR introduce a breaking change?

  1. No. Existing code blocks without the copy button will continue to function as before.

@vercel
Copy link

vercel bot commented Nov 25, 2025

@Rajankannaujiya is attempting to deploy a commit to the OpenJS Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 25, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@evenstensberg
Copy link
Member

Hi @Rajankannaujiya nice work. Could you sign the CLA?

@Rajankannaujiya
Copy link
Author

Hi @Rajankannaujiya nice work. Could you sign the CLA?

Thank you @evenstensberg , I have Signed the CLA.

@vercel
Copy link

vercel bot commented Nov 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
webpack-js-org Error Error Nov 27, 2025 0:19am

@evenstensberg
Copy link
Member

@Rajankannaujiya could you add an example of a code snippet using copy button?

@Rajankannaujiya
Copy link
Author

Rajankannaujiya commented Nov 27, 2025

@Rajankannaujiya could you add an example of a code snippet using copy button?

@evenstensberg Could you tell me where I should write the example? I’m thinking of putting it in src/contents/concepts/output.mdx. Is that the right place?

@evenstensberg
Copy link
Member

Just pick one code block you want and lets see if this pr is good or not

@Rajankannaujiya
Copy link
Author

Just pick one code block you want and lets see if this pr is good or not

@evenstensberg I added an example of a code snippet using copy button in the src/contents/concepts/output.mdx file.

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