Skip to content

feat(share): Add Copy Link Button to ShareButtons Component - #8345

Closed
tmdeveloper007 wants to merge 1 commit into
JhaSourav07:mainfrom
tmdeveloper007:#8335
Closed

feat(share): Add Copy Link Button to ShareButtons Component#8345
tmdeveloper007 wants to merge 1 commit into
JhaSourav07:mainfrom
tmdeveloper007:#8335

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Summary of What Has Been Done

Added a copy-link button to components/ShareButtons.tsx that copies the share URL to the clipboard when clicked. Uses the existing copyToClipboard utility with graceful fallback to document.execCommand for older browsers.

Changes Made

  • components/ShareButtons.tsx: Added FaLink icon from react-icons/fa6, import of copyToClipboard from @/utils/clipboard, and a <button> with aria-label="Copy link to clipboard". The button gracefully handles clipboard API failures silently.
  • components/ShareButtons.test.tsx: Added clipboard API mock, and two new test cases for the copy-link button: verifying it renders and that it calls navigator.clipboard.writeText with the correct URL.

Impact it Made

Improves UX by providing a quick way to copy the URL without opening a social media share dialog. Follows accessibility best practices with proper aria labels.

Closes #8335

Note: Please assign this PR to the tmdeveloper007 account.

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

@tmdeveloper007 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@retenta-bot

retenta-bot Bot commented Jul 26, 2026

Copy link
Copy Markdown

This PR enhances the user experience by providing a quick way to copy URLs directly from the ShareButtons component. It leverages the existing copyToClipboard utility, which has been previously validated for its fallback support in older browsers. This aligns with our goal of improving usability across the application. Thank you for your contribution, and I look forward to seeing this feature in action!

@retenta-bot retenta-bot Bot changed the title feat(share): added copy-link button to ShareButtons component feat(share): Add Copy Link Button to ShareButtons Component Jul 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @tmdeveloper007! Thanks for your interest in contributing to CommitPulse! 🙏

Unfortunately, this PR has been automatically closed because you are not assigned to the linked issue #8335 — feat(share): add copy-link button to ShareButtons component.

To avoid this in the future, please follow these steps:

  1. Claim the issue — Comment /claim on #8335 if you are the issue author, or ask a maintainer to /assign you.
  2. Wait for confirmation — The bot will confirm your assignment with a ✅ reply.
  3. Then open your PR — Link the issue with Fixes #8335 in your description.

💡 You can be assigned to up to 5 open issues at a time. Check your current assignments before claiming a new one.

We look forward to your contribution once you're assigned! 🚀

@github-actions github-actions Bot closed this Jul 26, 2026
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.

feat(share): add copy-link button to ShareButtons component

1 participant