feat: sort users alphabetically when adding to album#27731
Merged
danieldietzler merged 2 commits intoApr 14, 2026
Conversation
danieldietzler
left a comment
Member
There was a problem hiding this comment.
Nice one! Little side note; you've stated that users are currently sorted by id in the description. That's not true, they aren't sorted at all
Comment on lines
+20
to
+22
| users | ||
| .filter(({ id }) => !excludedUserIds.includes(id)) | ||
| .sort((a, b) => (a.name > b.name ? 1 : b.name > a.name ? -1 : 0)), |
Member
There was a problem hiding this comment.
Using lodash's sortBy with sortBy(users.filter..., ['name']) is probably cleaner
Contributor
Author
There was a problem hiding this comment.
Now implemented with lodash's sortBy function as suggested and resolved merge conflicts. Sorting and filtering (#27732) were tested again.
d328b31 to
0e1d267
Compare
11 tasks
svfoxat
pushed a commit
to svfoxat/immich
that referenced
this pull request
May 11, 2026
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.
Description
Changed the order of users are displayed in the
AlbumAddUsersModal, from ID-sorted to sorted alphabetically by user name. For large immich-instances it is now easier to find a specific user to share an album with.How Has This Been Tested?
Screenshots (if appropriate)
Unsorted
rev bee49ce

Sorted
rev d328b31

Checklist:
src/services/uses repositories implementations for database calls, filesystem operations, etc.src/repositories/is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services/)Please describe to which degree, if any, an LLM was used in creating this pull request.
generated commit message