immich
immich copied to clipboard
feat(web): Add album filter to search
Description
Adds an album dropdown to the search filter modal, using the recently added album search filters (#18985). The filter modal is slightly rearranged, with albums and tags both being half-width, taking up the space tags used to. The ComboBox has been modified to show thumbnails (default off, same layout as usual). The "Not in any album" filter checkbox is automatically unchecked and disabled if the album filter is set. Clearing albums re-enables the checkbox.
How Has This Been Tested?
- Create albums, some that share images
- Search one album, combined with other filters (ie. Person 1, album 1, will display assets with the person in selected album).
- Searching multiple albums limits the search to assets that are present in both albums (asset in album1 AND album 2).
Screenshots (if appropriate)
Checklist:
- [x] I have performed a self-review of my own code
- [x] I have made corresponding changes to the documentation if applicable
- [x] I have no unrelated changes in the PR.
- [x] I have confirmed that any new dependencies are strictly necessary.
- [x] I have written tests for new code (if applicable)
- [x] I have followed naming conventions/patterns in the surrounding code
- [x] All code in
src/services/uses repositories implementations for database calls, filesystem operations, etc. - [x] All code in
src/repositories/is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services/)
This is probably good enough for the time being, although I'd love to see how badly it performs on large instances with many albums
Created 10k albums. Album dropdown takes less than a second to populate with album titles, thumbnails loaded gradually but slowly. Modal itself opened without delay.
When an album is selected, the modal takes a second to load the selected chip, since it relies on the albums to be loaded and albumMap created.
All this is obviously worse on a bad connection, and no worse than loading albums in general (add to album, view albums) when there are many thousand :p
I hope this feature can be implemented soon! I would really like the ability to search for assets that are in multiple albums. Thanks for the work on this.
Closes #12258 if merged