Skip to content
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 (server, web): Implement Archive #2225

Merged
merged 16 commits into from
Apr 12, 2023

Conversation

brighteyed
Copy link
Contributor

@brighteyed brighteyed commented Apr 9, 2023

This PR partially (for web UI only) implements an Archive feature mentioned in #1625, #1638 and #1681.

Selected photos and videos can be archived from the Photos page. New Archive button has been added to the sidebar and the Archive page is similar to the Favorites page.

Archive is a way to exclude photos and videos from the main timeline. It is useful for receipts, schedules, screenshots, etc. They can still be deleted, marked as favorite, added to albums as usual. Similar to Google Photos implementation.

I've tested web UI thoroughly (archive/unarchive/search). Not sure if mobile app doesn't require any code modifications, though I have successfully built Android APK. Mobile app needs testing.

Screenshot 2023-04-09 162346
Sidebar

Screenshot 2023-04-09 162434
Appbar

@alextran1502
Copy link
Contributor

Can you elaborate a little bit on the description of what the Archive will do? Would deleted item go in here? or is this to hide a certain asset?

@jrasm91
Copy link
Contributor

jrasm91 commented Apr 10, 2023

Looking through the code it looks similar to google photos implementation. It's basically a way to remove an item from the main timeline without deleting it. Accomplished by an isArchived flag, similar to isFavorite, except this one is excluded in the timeline queries. To see the photos there is a separate view. The photos can still be deleted as usual, and even added to albums, etc. Really just a special flag to "archive" content out of the main timeline.

@alextran1502
Copy link
Contributor

@jrasm91 Thank you, I've never used the Archive functionality of GPhotos 😄

@jrasm91
Copy link
Contributor

jrasm91 commented Apr 10, 2023

Nice. It is similar to archive functionally in mail apps too, if you've used that. Basically remove an item from the "inbox", but still be able to search for and find it later.

For photos it works great for pictures of receipts, screenshots, documents, etc.

@brighteyed
Copy link
Contributor Author

brighteyed commented Apr 10, 2023

Can you elaborate a little bit on the description of what the Archive will do? Would deleted item go in here? or is this to hide a certain asset?

@jrasm91 is completely right in his reply. I couldn't have answered better. Changed PR description to clarify.

@vercel
Copy link

vercel bot commented Apr 11, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
immich ⬜️ Ignored (Inspect) Apr 12, 2023 5:12am

Copy link
Contributor

@alextran1502 alextran1502 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Looks good, I fixed the merge conflict, and an issue with the close button doesn't close the menu bar. Are you planning on working on the mobile portion as well?

@brighteyed
Copy link
Contributor Author

Unfortunately, I have no experience with Flutter at all, so I had no such plans

@brighteyed
Copy link
Contributor Author

I found a bug:

  1. Archive any photo
  2. Go to Archive page
  3. Select photo
  4. Click Delete button

Result: "Error deleting assets" popup and until page reloading, the photo is still selected and remains visible.

Will debug this issue tomorrow

@brighteyed
Copy link
Contributor Author

Will debug this issue tomorrow

Fixed. assetStore doesn't contain archived assets. Thus the second call to assetStore.removeAsset caused an exception

old endpoint: /asset/archived-count-by-user-id
new endpoint: /asset/stat/archive
@alextran1502 alextran1502 merged commit d314805 into immich-app:main Apr 12, 2023
16 checks passed
@ollioddi
Copy link

ollioddi commented Apr 13, 2023

Would it be possible to archive a whole album as well?

Lets say you have an album with many photos, which you may not want to pollute the timeline with, but rather look up as an album.

Would probably be its own PR but i am just curious :-)

EDIT: To specify a whole album and not as archiving each item individually.

@brighteyed
Copy link
Contributor Author

This PR doesn't have this functionality. Google Photos also doesn't have this feature

@colin715
Copy link

Would it be possible to archive a whole album as well?

Lets say you have an album with many photos, which you may not want to pollute the timeline with, but rather look up as an album.

Would probably be its own PR but i am just curious :-)

EDIT: To specify a whole album and not as archiving each item individually.

This would work great for my use-case (#1638)

@brighteyed brighteyed deleted the feat/archive branch May 5, 2023 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants