feat: add copy button for package versions#1447
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds copy-to-clipboard support for the resolved package version on the package detail page: introduces a new clipboard instance and state ( Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
|
|
||
| //copy package name | ||
| const { copied: copiedVersion, copy: copyVersion } = useClipboard({ | ||
| source: resolvedVersion.value ?? '', |
There was a problem hiding this comment.
In which case there is no value? Maybe we should just not show the copy button when it happens.
There was a problem hiding this comment.
I thought this was already the case? This is why I encapsulated it in the version span .
|
Oh also, this copies the version without the "v" prefix, right? (I'd expect it to do so) |
Yes, the button only copies the version without the v prefix |
4385a29 to
868828e
Compare
095d03d to
cdc7f39
Compare
|
Thanks for your first contribution, @agamyo168! 🚀 We'd love to welcome you to the npmx community. Come and say hi on Discord! And once you've joined, visit npmx.wamellow.com to claim the contributor role. |

this is my attempt at resolving: #1421
I'm not really good at front-end and I have no experience with vue so feel free to judge.
I have added a small button to copy the package version:
