Skip to content

Drop react-copy-to-clipboard dependency and add feedback to IdCopy#64

Merged
cmil merged 4 commits into
mainfrom
63-navigator-clipboard
Jul 3, 2026
Merged

Drop react-copy-to-clipboard dependency and add feedback to IdCopy#64
cmil merged 4 commits into
mainfrom
63-navigator-clipboard

Conversation

@cmil

@cmil cmil commented Jul 3, 2026

Copy link
Copy Markdown
Member
  • Removes the react-copy-to-clipboard peer dependency (and its types) from
    IdCopy, replacing it with navigator.clipboard.writeText() via an onClick
    handler — no behaviour change for consumers, one fewer package to install.
  • Adds visual copy feedback: the clipboard icon swaps to a check mark for 1.5s
    after clicking, then reverts.

Closes #63

cmil added 3 commits July 3, 2026 18:27
Replace the CopyToClipboard wrapper in IdCopy with a native
navigator.clipboard.writeText() onClick handler, eliminating
react-copy-to-clipboard as both a dev and peer dependency.

Closes #63
@cmil cmil changed the title Replace react-copy-to-clipboard with native clipboard API and add copy feedback Drop react-copy-to-clipboard dependency and add feedback to IdCopy Jul 3, 2026
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.09%. Comparing base (ebbea55) to head (14e4981).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #64      +/-   ##
==========================================
+ Coverage   93.97%   94.09%   +0.12%     
==========================================
  Files          31       31              
  Lines         282      288       +6     
  Branches       83       85       +2     
==========================================
+ Hits          265      271       +6     
  Misses          4        4              
  Partials       13       13              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cmil cmil merged commit 91ba4c2 into main Jul 3, 2026
5 checks passed
@cmil cmil deleted the 63-navigator-clipboard branch July 3, 2026 17:07
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.

Replace react-copy-to-clipboard with browser-native navigator.clipboard API

1 participant