Skip to content

🎨 Palette: Add Copy-to-Clipboard Utility to Code Block#26

Open
rtech-technologies wants to merge 1 commit into
mainfrom
palette/copy-code-ux-7382549690690944635
Open

🎨 Palette: Add Copy-to-Clipboard Utility to Code Block#26
rtech-technologies wants to merge 1 commit into
mainfrom
palette/copy-code-ux-7382549690690944635

Conversation

@rtech-technologies

Copy link
Copy Markdown
Owner

This PR adds a small but high-impact micro-UX improvement to the os2.html page. A "Copy" button has been added to the assembly code block, allowing users to easily copy technical snippets.

💡 What:

  • Added an absolutely positioned "Copy" button to the .code-window in os2.html.
  • Implemented a JavaScript copyToClipboard function with success feedback.
  • Used Tailwind group-hover and focus classes to keep the UI clean by default.

🎯 Why:

  • Improves the utility of technical documentation/specifications.
  • Provides immediate, delightful feedback to the user.
  • Adheres to the terminal-inspired aesthetic while adding modern convenience.

♿ Accessibility:

  • Added aria-label="Copy code to clipboard".
  • Ensured the button is visible on focus (focus:opacity-100) for keyboard users.
  • Maintained high-contrast focus indicators.

📸 Verification:

  • Verified using a Playwright script that confirms the button text change and styling update upon clicking.
  • Tested fallback mechanism for clipboard interaction.

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

Added a 'Copy' button to the terminal feed in `os2.html` to improve micro-UX.
- Button is revealed on hover/focus using Tailwind's `group` utilities.
- Provides visual feedback ('Copied!' text and theme swap) upon success.
- Includes a robust fallback for environments without `navigator.clipboard`.
- Fully accessible with ARIA labels and focus states.

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