Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: fixed the collections page sorting logic and add URL persistence#5375

Open
Qu1et-x wants to merge 3 commits intomodrinth:main from
Qu1et-x:feat/collections-sort-persistence
Open

feat: fixed the collections page sorting logic and add URL persistence #5375
Qu1et-x wants to merge 3 commits intomodrinth:main from
Qu1et-x:feat/collections-sort-persistence

Conversation

@Qu1et-x
Copy link

@Qu1et-x Qu1et-x commented Feb 15, 2026

Summary

This PR improves the collection page's user experience by fixing a sorting conflict and adding state persistence to the URL.

Changes

  • Fixed Sorting Logic: Removed a conflicting inline .sort() in the template that was overriding the computed property.
  • Added URL Persistence: Integrated useNativeRoute and useNativeRouter to synchronize the sortBy state with the URL query parameter ?s=.
  • UI Consistency: Replaced the previous search row with a DropdownSelect component, matching the design language used in the search page (index.vue).
  • Improved Layout: Adjusted margins (mb-3) and input heights to create a more compact and modern look.
  • Empty State: Added a visual feedback section for when no collections match the user's search query.

Technical Details

  • Used a watch effect on sortBy to trigger router.replace for seamless URL updates without adding to browser history.
  • Ensured orderedCollections handles both filtering and sorting in a single reactive computed property.

Verification

  • Verified that sorting works as expected on both desktop and mobile.
  • Confirmed that refreshing the page restores the previously selected sorting option.

@Qu1et-x Qu1et-x changed the title (削除) "feat(collections): fix sorting logic and add URL persistence" (削除ここまで) (追記) feat: fixed the collections page sorting logic and add URL persistence (追記ここまで) Feb 15, 2026
@IMB11 IMB11 added frontend Involves work from the frontend team 📂 Under review [Triage] Is being reviewed by Modrinth Staff for future roadmap consideration. labels Feb 16, 2026
@IMB11 IMB11 self-requested a review February 16, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@IMB11 IMB11 Awaiting requested review from IMB11

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

frontend Involves work from the frontend team 📂 Under review [Triage] Is being reviewed by Modrinth Staff for future roadmap consideration.

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /