Skip to content

fix: make version cards clickable and highlight the active version#1050

Open
IdrisGit wants to merge 4 commits intonpmx-dev:mainfrom
IdrisGit:fix-version-selection-box
Open

fix: make version cards clickable and highlight the active version#1050
IdrisGit wants to merge 4 commits intonpmx-dev:mainfrom
IdrisGit:fix-version-selection-box

Conversation

@IdrisGit
Copy link
Contributor

@IdrisGit IdrisGit commented Feb 5, 2026

This PR fixes two issues:

  • Only the version number in the version card is the clickable area, while visually the whole section should be clickable area -- fixed this using stretched links method.
  • The latest version card is always highlighted even when we are not on the current version and it not being highlighted, creating confusion of which version is actually selected at a glance -- fixed this by highlighting the current selected version and adding accent color to the latest tag

screen recording of the issue

version_card_issue.mp4

screen recording of the fix

version_card_fix_compressed.mp4

@vercel
Copy link

vercel bot commented Feb 5, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 6, 2026 6:38am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 6, 2026 6:38am
npmx-lunaria Ignored Ignored Feb 6, 2026 6:38am

Request Review

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 52.17391% with 22 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/components/Package/Versions.vue 52.17% 22 Missing ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

A new public prop currentVersion?: string | null was added to the Versions component. The component now conditionally applies classes and structural wrappers to highlight rows, expanded sections and group headers when a version matches currentVersion, including hover/focus adjustments and z-index/positioning changes. Several ProvenanceBadge instances set :linked="false". The package page passes current-version bound to resolvedVersion. Two unit tests were added: one asserting the current version row is highlighted, and one asserting the latest dist-tag uses the accent text colour.

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly relates to the changeset, describing fixes for version card clickability and highlighting of the currently selected version.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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.

1 participant