mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5383] [MERGED] feature: add alphabetical sort for user and team collections #5183
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5183
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5383
Author: @mirarifhasan
Created: 9/10/2025
Status: ✅ Merged
Merged: 9/23/2025
Merged by: @jamesgeorge007
Base:
next← Head:feat/collection-sorting📝 Commits (10+)
ae0642efeat: add sorting for team collections and requests5589b80feat: add sorting and subscription support for user collections0dd1a7cchore: feedback resolve37b7c43feat: add UI slots for sorting and add store functions6576094chore: port team collection adapter to service architecture185b2d9chore: new req version ( add _ref_id to request schema)f958cc7fix: tests764e18dfix: inter module imports58d9f35fix: use GqlTeamMemberGuard in sort mutationa79f4f7refactor: sort event payloads to use structured data📊 Changes
63 files changed (+3476 additions, -339 deletions)
View changed files
📝
packages/hoppscotch-backend/src/app.module.ts(+2 -0)📝
packages/hoppscotch-backend/src/gql-schema.ts(+4 -0)➕
packages/hoppscotch-backend/src/orchestration/sort/sort-team-collection.resolver.ts(+104 -0)➕
packages/hoppscotch-backend/src/orchestration/sort/sort-user-collection.resolver.ts(+74 -0)➕
packages/hoppscotch-backend/src/orchestration/sort/sort.model.ts(+16 -0)➕
packages/hoppscotch-backend/src/orchestration/sort/sort.module.ts(+25 -0)➕
packages/hoppscotch-backend/src/orchestration/sort/sort.service.spec.ts(+180 -0)➕
packages/hoppscotch-backend/src/orchestration/sort/sort.service.ts(+92 -0)📝
packages/hoppscotch-backend/src/pubsub/topicsDefs.ts(+5 -0)📝
packages/hoppscotch-backend/src/team-collection/team-collection.service.spec.ts(+70 -0)📝
packages/hoppscotch-backend/src/team-collection/team-collection.service.ts(+54 -0)📝
packages/hoppscotch-backend/src/team-request/team-request.service.spec.ts(+84 -5)📝
packages/hoppscotch-backend/src/team-request/team-request.service.ts(+54 -0)➕
packages/hoppscotch-backend/src/types/SortOptions.ts(+10 -0)📝
packages/hoppscotch-backend/src/user-collection/user-collection.service.ts(+51 -0)📝
packages/hoppscotch-backend/src/user-request/user-request.module.ts(+1 -0)📝
packages/hoppscotch-backend/src/user-request/user-request.service.ts(+54 -1)📝
packages/hoppscotch-common/locales/en.json(+4 -1)📝
packages/hoppscotch-common/src/components/collections/Collection.vue(+111 -2)📝
packages/hoppscotch-common/src/components/collections/MyCollections.vue(+69 -8)...and 43 more files
📄 Description
Closes BE-646 FE-901 FE-1005 FE-699 #4353
What's changed
This pull request introduces support for sorting user and team collections and their requests, including GraphQL mutations and subscriptions for sort events. It adds new resolvers, services, and enum types to handle sorting by title (ascending/descending) or default order, and publishes sort events via pub/sub for real-time updates.
Sorting Functionality Implementation
SortOptionsenum tosrc/types/SortOptions.tsto specify supported sorting criteria (TITLE_ASC,TITLE_DESC).UserCollectionService,TeamCollectionService,UserRequestService, andTeamRequestServiceto reorder items based on the selected sort option and update theirorderIndex. [1] [2] [3] [4]GraphQL API Extensions
SortUserCollectionResolverandSortTeamCollectionResolverto provide mutations for sorting collections and subscriptions for sort events. [1] [2]SortModulefor dependency injection. [1] [2] [3]Pub/Sub Integration for Sort Events
These changes collectively enable sorting of collections and requests, expose the functionality via GraphQL, and notify clients of sort events for improved UX.
Other changes in FE
updateInheritedPropertiesForAffectedRequestshelper function is updated where the latest inheritedProperties is fetched each time there is change in the effectedTabs. This fixes the existing bug's with updating inheritedProperties.Notes to reviewers
Nil
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.