Skip to content

🎨 Palette: Add Copy to Clipboard for code blocks#28

Open
rtech-technologies wants to merge 1 commit into
mainfrom
palette-add-copy-code-7621078964489977638
Open

🎨 Palette: Add Copy to Clipboard for code blocks#28
rtech-technologies wants to merge 1 commit into
mainfrom
palette-add-copy-code-7621078964489977638

Conversation

@rtech-technologies

Copy link
Copy Markdown
Owner

💡 What

Added a functional "Copy" button to the terminal/code block in os2.html.

🎯 Why

Improves user intuition and utility by allowing easy copying of assembly code snippets, fitting the "Direct Technical Interface" theme of RTECH.

♿ Accessibility

  • Added aria-label="Copy code to clipboard".
  • Ensured button is visible on keyboard focus using focus:opacity-100.
  • Maintained high contrast with the Lime-500 accent color.

📸 Before/After

The code block now reveals a "Copy" button in the top-right corner on hover or focus. Upon clicking, it briefly transforms to "COPIED!" with a bright lime background to confirm the action.


PR created automatically by Jules for task 7621078964489977638 started by @rtech-technologies

- Added Copy button to .code-window in os2.html
- Implemented copyCode JS function with navigator.clipboard and fallback
- Added success feedback state for 2 seconds
- Ensured keyboard visibility via focus:opacity-100

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

1 participant