Added copy-to-clipboard button#74
Conversation
|
Someone is attempting to deploy a commit to the PushkarScripts Team on Vercel. A member of the Team first needs to authorize it. |
|
give a rough idea about copy button and container layout |
Related IssueFixes #9 DescriptionThis PR implements a global, lightweight Copy-to-Clipboard feature for all code snippets and command blocks across the platform's academic modules. Key changes include:
Type of Change
Screenshots / Demo
How Has This Been Tested?
Checklist
AI Usage
If AI tools were used, briefly explain how:Used to draft the reactive toggle delay logic for the visual "Copied!" feedback state. Additional NotesThis directly fixes the accessibility bottleneck for mobile workspace readers who previously struggled with manual inline text selection. |


Related Issue
Fixes #9
Description
This PR implements a global, lightweight Copy-to-Clipboard feature for all code snippets and command blocks across the platform's academic modules.
Key changes include:
<CodeBlock />component template used universally across Semester 1, 2, and 4 course pages.useState) to toggle between a default copy icon and a temporary"Copied!"indicator text/icon upon successful execution to improve user experience.navigator.clipboard.writeTextto keep the codebase lightweight and eliminate unnecessary third-party package dependencies.Type of Change
Screenshots / Demo
How Has This Been Tested?
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:
Used to draft the reactive toggle delay logic for the visual "Copied!" feedback state.
Additional Notes
This directly fixes the accessibility bottleneck for mobile workspace readers who previously struggled with manual inline text selection.