Add copy-to-clipboard functionality to documentation code blocks#11
Open
sarcaxticlarka wants to merge 1 commit intooppia:masterfrom
Open
Add copy-to-clipboard functionality to documentation code blocks#11sarcaxticlarka wants to merge 1 commit intooppia:masterfrom
sarcaxticlarka wants to merge 1 commit intooppia:masterfrom
Conversation
- Created copy-code.css for button styling with clipboard SVG icons - Created copy-code.js for copy functionality with modern Clipboard API and fallback - Updated 12 documentation HTML files to include copy-code assets - Button positioned absolutely (top-right) to avoid code layout disruption - Visual feedback with blue highlight and checkmark icon when copied - No dependencies, pure vanilla JavaScript implementation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
Essential Checklist
Changes Made
New Files:
site/doc/copy-code.css- Button styling with SVG clipboard iconssite/doc/copy-code.js- Copy functionality with Clipboard API + fallbackModified Files:
Total: 14 files changed, 138+ lines added
Implementation Details
Testing
✅ Tested locally on http://127.0.0.1:8066
✅ All 12 documentation pages working correctly
✅ No console errors
✅ Copy functionality verified
✅ Visual feedback displays properly
✅ Layout remains intact (no disruption)
Files Updated
Note
This PR only enhances documentation UX and doesn't modify Guppy's core functionality or package.json. Changes are isolated to static HTML documentation pages only.