immich icon indicating copy to clipboard operation
immich copied to clipboard

feat: hide faces

Open martabal opened this issue 2 years ago • 2 comments

This PR adds the ability to hide people from asset viewer & explore page.

To do:

  • move the logic from the client to server
  • add server tests
  • fix bugs

https://github.com/immich-app/immich/assets/74269598/36255a7e-daf3-4467-9a71-6358f122a3aa

martabal avatar Jul 14 '23 10:07 martabal

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
immich ⬜️ Ignored (Inspect) Visit Preview Jul 18, 2023 6:05pm

vercel[bot] avatar Jul 14 '23 10:07 vercel[bot]

Looks like a good start. A few notes:

* We can definitely filter out people when we get asset details. That could even be in the response dto mapper for now.

* I think the people endpoint needs to be able to return hidden people, so that we can use it to show a list that the user can toggle, although we do want to hide them on the explore page. We can keep filtering that client-side or have a query param to show hidden, and exclude them by default.

* In general we have `isAdmin`, `isArchived`, `isFavorite`, `isVisible`, etc. Maybe it would be more consistent to have this be called `isHidden`.

Thank you for your feedback !

martabal avatar Jul 14 '23 17:07 martabal

I added more use cases with view all and show & hide faces buttons

https://github.com/immich-app/immich/assets/74269598/9f17e585-aff8-4158-b592-6ce89be9e2ed

martabal avatar Jul 15 '23 23:07 martabal

The latest video doesn't indicate that if you hide faces, how can you unhide them?

alextran1502 avatar Jul 16 '23 01:07 alextran1502

The latest video doesn't indicate that if you hide faces, how can you unhide them?

The notification is hiding the Show & hide faces button which allow to hide and unhide faces, I have updated the video

martabal avatar Jul 16 '23 10:07 martabal

@jrasm91 another thing, currently, I use the existing updatePerson endpoint to update the visibility of each person. However, this means that if the users need to modify the visibility for 20 persons, they will have to make 20 API calls. Should I create a new endpoint ?

martabal avatar Jul 16 '23 13:07 martabal

I think that is ok. It is unlikely to be a problem unless they're doing 100 or more. Even then, they're probably only going to do it once. So I think it's ok to not optimize by adding a new endpoint.

jrasm91 avatar Jul 16 '23 15:07 jrasm91