-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(web): display number of likes in asset viewer #18911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(web): display number of likes in asset viewer #18911
Conversation
It can very easily display the total amount of likes throughout the whole album. I don't show it on purpose as I was not sure if it was relevant but it's worth discussing the matter. The /api/activities/statistics api endpoint already exposes the total number of likes for the album so you can get this info at the same time as the number of comments. |
danieldietzler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! @alextran1502 needs to decide if we actually want that UX/UI wise.
Co-authored-by: Daniel Dietzler <[email protected]>
ef2c3ed to
9f83cb4
Compare
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
|
Sorry for all the mess, everything should pass now :) |
* feat: display number of likes * fix: properly decrement like count on unlike Co-authored-by: Daniel Dietzler <[email protected]> * chore: pr feedback * chore: updated related test * chore: formatter run * chore: force numberOfLikes to null in album context to pass lint * chore: open-api updated * fix: use undefined, not null * styling tweaks * chore: updated sql --------- Co-authored-by: Daniel Dietzler <[email protected]> Co-authored-by: Alex Tran <[email protected]>

Description
When an asset in a shared album has 1 or more likes, the total like count is displayed next to the heart icon (just like it already does for comments).
Extra: count text size reduced from XL to L to prevent the activity widget from growing when counts appear.
How Has This Been Tested?
Screenshots (if appropriate)
API changes
The
/api/activities/statisticsendpoint now also returns the like count :{"comments":2,"likes":8}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/)