Skip to content

feat: add copy profile link button#120

Open
amritbej wants to merge 1 commit into
Dev-Card:mainfrom
amritbej:feature/copy-profile-link
Open

feat: add copy profile link button#120
amritbej wants to merge 1 commit into
Dev-Card:mainfrom
amritbej:feature/copy-profile-link

Conversation

@amritbej
Copy link
Copy Markdown

@amritbej amritbej commented May 16, 2026

Summary

Added a Copy Link button beside the Get DevCard CTA on the profile page. The button copies the current profile URL to the clipboard using the Clipboard API and shows transient success/failure notifications. Also added a fallback message for browsers where the Clipboard API is unavailable.

Closes #15


Type of Change

  • Bug fix
  • New feature
  • Refactor (no functional change)
  • UI / Design change
  • Tests only
  • Documentation
  • Infrastructure / DevOps
  • Security

What Changed

  • Added a Copy Link button near the Get DevCard CTA in apps/web/src/routes/u/[username]/+page.svelte
  • Implemented clipboard copy functionality using navigator.clipboard.writeText(window.location.href)
  • Added transient success/failure notifications and unsupported Clipboard API fallback handling

How to Test

  1. Run the frontend locally using pnpm dev:web

  2. Open a profile page such as http://localhost:5174/u/devcard-demo

  3. Click the Copy Link button and verify:

    • The URL is copied successfully
    • A success message appears
    • A fallback/error message appears if Clipboard API is unavailable

Checklist

  • My code follows the project's coding style (pnpm -r run lint passes).
  • TypeScript compiles without errors (pnpm -r run typecheck).
  • I have added or updated tests for the changes I made.
  • All tests pass locally (pnpm -r run test).
  • I have updated documentation where necessary.
  • No new console.log or debug statements left in the code.
  • Breaking changes are documented in this PR description.

UI change showing the new Copy Link button and notification behavior.


Additional Context

Production build completed successfully using pnpm build:web.

@Harxhit Harxhit added the gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. label May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web: add a copy-to-clipboard button on /u/[username] profile page

2 participants