feat: implemented 1-click clipboard copy button for preview URLs (#49)#69
Conversation
|
@prakshithamalla-art is attempting to deploy a commit to the Deekshith Gowda HS's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThe deployments page adds a ChangesPreview URL Copy Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/console/deployments/page.tsx`:
- Around line 52-58: The copy button lacks an accessible label for screen
readers; update the <button> that uses handleCopy and the copied state to
include an explicit aria-label (e.g., aria-label={copied ? "URL copied to
clipboard" : "Copy URL to clipboard"}) so the icon-only control has a proper
accessible name and reflects the copied state for assistive tech.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 32c87bc6-2304-441d-b07a-d8e4365f7d5f
📒 Files selected for processing (1)
app/console/deployments/page.tsx
Closes #49
🎯 Overview & Motivation
Manually highlighting and selecting text segments for sandbox deployment URLs in the dashboard console page (
app/console/deployments/page.tsx) can be cumbersome.This PR incorporates a clean interactive clipboard copy macro next to deployment preview target fields.
🛠️ Changes Implemented
<CopyButton />module usingnavigator.clipboard.writeText.CopyandChecklucide badges) to provide a clean 2-second visual confirmation window.Summary by CodeRabbit