Skip to content

🎨 Palette: implement inline copy feedback - #49

Open
anaxifty wants to merge 1 commit into
mainfrom
palette/copy-feedback-ux-16275729229165574006
Open

🎨 Palette: implement inline copy feedback#49
anaxifty wants to merge 1 commit into
mainfrom
palette/copy-feedback-ux-16275729229165574006

Conversation

@anaxifty

Copy link
Copy Markdown
Owner

This PR adds a delightful micro-UX improvement that provides immediate inline feedback when users copy content.

💡 What: A new copyFeedback utility that temporarily changes button text to "Copied!" while preserving existing icons and synchronizing ARIA labels.

🎯 Why: Toast notifications are helpful but can be missed if they appear far from the user's focus. Inline feedback provides instant interaction confirmation right where the user clicked.

Accessibility:

  • Dynamically updates aria-label to "Copied!" during the feedback period.
  • Added aria-live="polite" to ensure screen readers announce the status change.
  • Added aria-hidden="true" to decorative SVGs.
  • Added a descriptive aria-label to the previously unlabeled artifact copy button.

Implementation details:

  • Mutex guard prevents overlapping feedback cycles.
  • Correctly handles this context in refactored event listeners.
  • Uses existing --ok design token for success styling.

PR created automatically by Jules for task 16275729229165574006 started by @anaxifty

- Add `copyFeedback` utility in `js/utils.js` for consistent clipboard confirmation.
- Integrate feedback into chat messages, code blocks, and canvas copy buttons.
- Enhance accessibility with dynamic ARIA labels and `aria-live` announcements.
- Add `.copy-success` style using project design tokens.

Co-authored-by: anaxifty <[email protected]>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 22, 2026

Copy link
Copy Markdown

Deploying neuraldock with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7bc33b9
Status: ✅  Deploy successful!
Preview URL: https://0481e269.neural-dock.pages.dev
Branch Preview URL: https://palette-copy-feedback-ux-162.neural-dock.pages.dev

View logs

@google-labs-jules

Copy link
Copy Markdown

👋 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