🎨 Palette: Immediate inline feedback for clipboard actions - #47
Conversation
- 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]>
Deploying neuraldock with
|
| 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 |
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR adds immediate inline visual feedback for all "Copy" actions across the AI Studio interface.
💡 What:
copyFeedback(btn, successText, delay)utility injs/utils.js..copy-successclass tostyle.css.🎯 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:
aria-labelof the buttons is programmatically updated to "Copied!" (and restored afterwards) to ensure screen reader users receive status updates.📸 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