Skip to content

fix: keep versions modal options in query params#1725

Merged
danielroe merged 2 commits intonpmx-dev:mainfrom
sybers:feat_versions_modal_options_query_parameter
Feb 28, 2026
Merged

fix: keep versions modal options in query params#1725
danielroe merged 2 commits intonpmx-dev:mainfrom
sybers:feat_versions_modal_options_query_parameter

Conversation

@sybers
Copy link
Contributor

@sybers sybers commented Feb 27, 2026

🔗 Linked issue

partially resolves #1612

🧭 Context

Other modals have query params for state inside them, so the url is stable.

Versions modale didn't have query params for that!

📚 Description

This PR adds grouping, recent and lowUsage query params, using Vueuse useRouteQuery composable.

Reloading or sharing the url while the Versions modal is open now works :)

@vercel
Copy link

vercel bot commented Feb 27, 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 27, 2026 10:41pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 27, 2026 10:41pm
npmx-lunaria Ignored Ignored Feb 27, 2026 10:41pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

📝 Walkthrough

Walkthrough

The changes move versions modal state and filters into URL query parameters. Closing the distribution modal now also clears grouping, recent and lowUsage query parameters. The composable replaces local state with route-derived values: grouping is read via useRouteQuery with a transform mapping to major/minor, and showRecentOnly/showLowUsageVersions are backed by a new useBooleanRouteQuery helper that serialises booleans as true/false in the URL.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR successfully implements the core requirement from issue #1588: adding URL query parameters (grouping, recent, lowUsage) to the Versions modal, enabling URL stability and state preservation similar to the chart modal.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the Versions modal feature: modifications to Versions.vue and useVersionDistribution.ts composable remain within the stated objectives of adding query parameters for modal state persistence.
Description check ✅ Passed The PR description accurately describes the changeset, explaining that query parameters (grouping, recent, lowUsage) are being added to the Versions modal using useRouteQuery to maintain state.

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

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

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
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


ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85ac3d7 and d764cd9.

📒 Files selected for processing (2)
  • app/components/Package/Versions.vue
  • app/composables/useVersionDistribution.ts

@sybers sybers changed the title feat: keep versions modal options in query params (resolves #1588) feat: keep versions modal options in query params (resolves #1612) Feb 27, 2026
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

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

Files with missing lines Patch % Lines
app/composables/useVersionDistribution.ts 0.00% 5 Missing and 3 partials ⚠️
app/components/Package/Versions.vue 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@danielroe danielroe changed the title feat: keep versions modal options in query params (resolves #1612) fix: keep versions modal options in query params Feb 28, 2026
@danielroe danielroe added this pull request to the merge queue Feb 28, 2026
Merged via the queue into npmx-dev:main with commit 529898b Feb 28, 2026
21 checks passed
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.

Versions modal improvements

2 participants