Skip to content

feat: add package name copy button with package manager dropdown icon on search view#2474

Open
akadotsh wants to merge 1 commit intonpmx-dev:mainfrom
akadotsh:feat/search-view-package-name-copy-button
Open

feat: add package name copy button with package manager dropdown icon on search view#2474
akadotsh wants to merge 1 commit intonpmx-dev:mainfrom
akadotsh:feat/search-view-package-name-copy-button

Conversation

@akadotsh
Copy link
Copy Markdown
Contributor

🔗 Linked issue

Closes #2341

🧭 Context

Adds a copy-to-clipboard feature for package names in the search results view.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Apr 11, 2026 0:20am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Apr 11, 2026 0:20am
npmx-lunaria Ignored Ignored Apr 11, 2026 0:20am

Request Review

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4f691c04-f50a-48eb-ba74-7a97d14216be

📥 Commits

Reviewing files that changed from the base of the PR and between 0164064 and 930099d.

📒 Files selected for processing (1)
  • app/components/Package/Card.vue

📝 Walkthrough

Walkthrough

The Package/Card.vue component has been updated to add a copy-to-clipboard button for package names. A new computed property packageName is derived from the package data, wired to the useClipboard hook with a 2000ms feedback delay. The package-name heading now includes a CopyToClipboardButton component alongside a NuxtLink, triggered via a click handler. Layout and styling adjustments were made to accommodate the new button within the grouped wrapper element.

Possibly related PRs

Suggested reviewers

  • danielroe
  • Adebesin-Cell
  • knowler
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The PR description clearly relates to the changeset, describing the addition of a copy-to-clipboard feature for package names in search results.
Linked Issues check ✅ Passed The changes implement the core requirement from issue #2341: adding a copy button for package names on search result tiles to reduce user interaction steps.
Out of Scope Changes check ✅ Passed All changes are scoped to the Package Card component and directly support the linked issue requirement for copy functionality on search results.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@ghostdevv ghostdevv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR! I think the copy button should be always visible to the right of the package name, perhaps just the icon - there was an issue or comment about this for the ones we have already but I can't find it (other than #776) - what do you think?

@ghostdevv ghostdevv requested a review from alexdln April 12, 2026 02:06
<NuxtLink
:to="packageRoute(result.package.name)"
:prefetch-on="prefetch ? 'visibility' : 'interaction'"
class="decoration-none after:content-[''] after:absolute after:inset-0"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic that the entire card should be clickable seems not to work now. I think this is a more important feature on the search page than copying a name.
The copy button on the side will probably fix this (but it will create an extra interaction)

Could you please share, what user case would this might solve? I feel like user know the name they're looking for in the search already and then open the needed package and interact there

@serhalp serhalp added the ux Related to wider UX decisions label Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ux Related to wider UX decisions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Impl copy button with package manager dropdown icon's on search view

4 participants