You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📌 Description
This PR introduces a copy-to-clipboard feature for code snippets and command/terminal blocks across the platform to improve usability and developer experience.
The feature allows users to quickly copy code with a single click instead of manually selecting text, making the experience smoother—especially for longer snippets and mobile users.
✨Changes Made
Added a reusable copy-to-clipboard functionality for all code blocks
Implemented a copy button for code snippets and terminal/command sections
Added visual feedback on successful copy (e.g., “Copied!” state)
Ensured smooth behavior across desktop and mobile devices
Integrated the feature consistently with the existing UI/theme system
Added/updated CodeBlock.tsx component for centralized handling
🚀 Type of Change
✅ New feature
✅ UI/UX improvement
📸Screenshot/ Demo
🧪Testing Done
•Verified copy functionality for multiple code blocks in local dev environment.
•Checked responsive behavior on mobile viewports.
•Cross-browser testing performed on Chrome and Firefox.
•Confirmed no regressions in existing content rendering.
☑️Checklist
[ ✅] My code follows the project structure and conventions
[ ✅] I have tested the changes locally
[✅ ] I have linked the related issue properly
[✅ ] I have added screenshots where applicable
[ ✅] No existing functionality was broken
🤖AI Usage
[❎ ] I have not used AI tools for this contribution
[ ✅] I have used AI tools (ChatGPT, Copilot, Claude, etc.) and I have reviewed, verified, and understood all generated code/content before submitting this PR
If AI tools were used, briefly explain how:
AI assistance was used to improve the quality of PR documentation by helping with structuring, wording clarity, and formatting consistency across sections. The contributor independently implemented and tested all functional changes, ensured correctness in a local environment, and manually reviewed all AI-suggested text prior to submission.
🚀 Additional Notes
This feature improves developer experience by reducing friction when copying code. Future improvements may include:
Keyboard shortcut support (e.g., Ctrl+C on focused block)
Copy history indicator
Custom tooltip animations for better UX
📌 Description
This PR Add a copy-to-clipboard button for code snippets and command blocks across the platform. It allows users to copy code with a single click, improving usability and making it easier to use on both desktop and mobile devices.
✨Changes Made
Added a reusable copy-to-clipboard functionality for all code blocks
Implemented a copy button for code snippets and terminal/command sections
Added visual feedback on successful copy (e.g., “Copied!” state)
Ensured smooth behavior across desktop and mobile devices
Integrated the feature consistently with the existing UI/theme system
Added/updated CodeBlock.tsx component for centralized handling
🚀 Type of Change
✅ New feature
✅ UI/UX improvement
📸Screenshot/ Demo
🧪Testing Done
•Verified copy functionality for multiple code blocks in local dev environment.
•Checked responsive behavior on mobile viewports.
•Cross-browser testing performed on Chrome and Firefox.
•Confirmed no regressions in existing content rendering.
☑️Checklist
[ ✅] My code follows the project structure and conventions
[ ✅] I have tested the changes locally
[✅ ] I have linked the related issue properly
[✅ ] I have added screenshots where applicable
[ ✅] No existing functionality was broken
🤖AI Usage
[❎ ] I have not used AI tools for this contribution
[ ✅] I have used AI tools (ChatGPT, Copilot, Claude, etc.) and I have reviewed, verified, and understood all generated code/content before submitting this PR
If AI tools were used, briefly explain how:
AI assistance was used to improve the quality of PR documentation by helping with structuring, wording clarity, and formatting consistency across sections. The contributor independently implemented and tested all functional changes, ensured correctness in a local environment, and manually reviewed all AI-suggested text prior to submission.
🚀 Additional Notes
This feature improves developer experience by reducing friction when copying code. Future improvements may include:
Keyboard shortcut support (e.g., Ctrl+C on focused block)
Copy history indicator
Custom tooltip animations for better UX
The headings from code blocks disappear (see image below)
The image shared in PR description doesn't match with the actual implementation (atleast for C language)
The PR description is still not as per requirement.
Unnecessary emojis
Wrong markdown tags
Incorrect hierarchy between headings, subheadings and body.
Take your time but send an improved version of this PR with all the necessary changes made.
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
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.
🧩Components
CodeBlock, CopyToClipboard, UI/UX Enhancements
🔗 Related Issue
Fixes #9
📌 Description
This PR introduces a copy-to-clipboard feature for code snippets and command/terminal blocks across the platform to improve usability and developer experience.
The feature allows users to quickly copy code with a single click instead of manually selecting text, making the experience smoother—especially for longer snippets and mobile users.
✨Changes Made
Added a reusable copy-to-clipboard functionality for all code blocks
Implemented a copy button for code snippets and terminal/command sections
Added visual feedback on successful copy (e.g., “Copied!” state)
Ensured smooth behavior across desktop and mobile devices
Integrated the feature consistently with the existing UI/theme system
Added/updated CodeBlock.tsx component for centralized handling
🚀 Type of Change
📸Screenshot/ Demo

🧪Testing Done
•Verified copy functionality for multiple code blocks in local dev environment.
•Checked responsive behavior on mobile viewports.
•Cross-browser testing performed on Chrome and Firefox.
•Confirmed no regressions in existing content rendering.
☑️Checklist
🤖AI Usage
[❎ ] I have not used AI tools for this contribution
[ ✅] I have used AI tools (ChatGPT, Copilot, Claude, etc.) and I have reviewed, verified, and understood all generated code/content before submitting this PR
If AI tools were used, briefly explain how:
AI assistance was used to improve the quality of PR documentation by helping with structuring, wording clarity, and formatting consistency across sections. The contributor independently implemented and tested all functional changes, ensured correctness in a local environment, and manually reviewed all AI-suggested text prior to submission.
🚀 Additional Notes
This feature improves developer experience by reducing friction when copying code. Future improvements may include:
Keyboard shortcut support (e.g., Ctrl+C on focused block)
Copy history indicator
Custom tooltip animations for better UX