Skip to content

🎨 Palette: Immediate inline feedback for clipboard actions - #47

Open
anaxifty wants to merge 1 commit into
mainfrom
palette/clipboard-feedback-2610235906997786535
Open

🎨 Palette: Immediate inline feedback for clipboard actions#47
anaxifty wants to merge 1 commit into
mainfrom
palette/clipboard-feedback-2610235906997786535

Conversation

@anaxifty

Copy link
Copy Markdown
Owner

This PR adds immediate inline visual feedback for all "Copy" actions across the AI Studio interface.

💡 What:

  • Created a reusable copyFeedback(btn, successText, delay) utility in js/utils.js.
  • Integrated the utility into assistant message actions, markdown code blocks, the Artifact/Canvas panel, and the Share Modal.
  • Added a .copy-success class to style.css.
  • Updated the Share Modal to stay open for 700ms after a successful copy.

🎯 Why:

Providing immediate, localized feedback on clipboard actions increases user confidence and makes the interface feel more responsive. Previously, users relied on global toasts which could be easily missed or feel disconnected from the action point.

♿ Accessibility:

  • The aria-label of the buttons is programmatically updated to "Copied!" (and restored afterwards) to ensure screen reader users receive status updates.
  • Decorative icons are preserved during the text transition.

📸 Verification:

Verified using a Playwright script that mocked the clipboard API and captured screenshots of the button state transitions and the Share Modal's delayed closure. Passes JS syntax checks.


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

- Introduce `copyFeedback` utility in `js/utils.js` for consistent status updates.
- Add `.copy-success` style to `style.css` using existing tokens.
- Enhance all "Copy" buttons (chat messages, code blocks, canvas, share modal) with inline feedback.
- Add 700ms delay before closing Share Modal to allow perception of success state.
- Ensure screen reader accessibility by synchronizing `aria-label` with feedback text.

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

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

Copy link
Copy Markdown

Deploying neuraldock with  Cloudflare Pages  Cloudflare Pages

Latest commit: d95a774
Status: ✅  Deploy successful!
Preview URL: https://e24b9761.neural-dock.pages.dev
Branch Preview URL: https://palette-clipboard-feedback-2.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