feat(web): Add "set as featured" option for an asset #14879
Merged
+46
−1
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
This is a QoL feature that enables a user to set the featured photo of a person while inspecting (in full screen) said person.
This is an alternative flow to the currently existing one:
person -> three dots -> select featured photo
It is now possible to set a featured photo by doing this:
person -> photo -> three dots -> use this as featured photo
The option is hidden in all views except when a person is provided to the asset-grid (i.e. the people/id page)
Note: I have followed the "set as album cover" implementation for this. The prop is propagated from the
asset-grid
all the way down to theasset-viewer-nav-bar
. I do not like the fact that the handle function has been duplicated in both cases, but at least it's consistent.[handleSelectFeaturePhoto]
(https://github.com/IMBeniamin/immich/blob/de39bf2b1701069b33949d5da3e0f47cdd338672/web/src/lib/components/asset-viewer/actions/set-person-featured-action.svelte#L19)
handleSelectFeaturePhoto
How Has This Been Tested?
Screenshots
Checklist: