feat: fixed the collections page sorting logic and add URL persistence#5375
Merged
IMB11 merged 4 commits intomodrinth:mainfrom Mar 9, 2026
Merged
Conversation
…ent history pollution" This reverts commit 3924855.
IMB11
approved these changes
Mar 9, 2026
Member
|
Thank you! This is a really nice change. The community team will be glad for this change as they have tons of "Projects Of The Week" collections 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves the collection page's user experience by fixing a sorting conflict and adding state persistence to the URL.
Changes
.sort()in the template that was overriding the computed property.useNativeRouteanduseNativeRouterto synchronize thesortBystate with the URL query parameter?s=.DropdownSelectcomponent, matching the design language used in the search page (index.vue).mb-3) and input heights to create a more compact and modern look.Technical Details
watcheffect onsortByto triggerrouter.replacefor seamless URL updates without adding to browser history.orderedCollectionshandles both filtering and sorting in a single reactive computed property.Verification