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

refactor(server,web): time buckets for main timeline, archived, and favorites (1) #3537

Merged
merged 10 commits into from
Aug 4, 2023

Conversation

jrasm91
Copy link
Contributor

@jrasm91 jrasm91 commented Aug 3, 2023

In this PR:

  • New time bucket endpoints in the server (upgraded to domain/)
  • Use time buckets in web for favorites and archived pages

Tested Scenarios:

  • Archive single photo (photos page)
  • Archive multiple photos (photos page)
  • Favorite single photos (photos page)
  • Favorite multiple photos (photos page)
  • Select single photos (photos page)
  • Select multiple photos (photos page)
  • Select multiple photos via shift + timeline jump (photos page)
  • Drag to scroll (photos page)
  • Click to scroll (photos page)
  • Delete one (photos page)
  • Delete multiple (photos page)
  • Unarchive single photos (archive page)
  • Unarchive multiple photos (archive page)
  • Select multiple photos (archive page)
  • Select multiple photos via shift + timeline jump
  • Favorite single photos (archive page)
  • Favorite multiple photos (archive page)
  • Delete single photo (archive page)
  • Delete multiple photos (archive page)
  • Drag to scroll (archive page)
  • Unarchive single photos (favorites page)
  • Unarchive multiple photos (favorites page)
  • Select multiple photos (favorites page)
  • Select multiple photos via shift + timeline jump (favorites page)
  • Delete single photo (favorites page)
  • Delete multiple photos (favorites page)
  • Drag to scroll (favorites page)

Notes for future PRs:

  • Use timeline on person detail page
  • Use timeline on individual share page
  • Use timeline on album (share) page
  • Optimize web multi-select / bulk operations. They currently make one request per asset and the requests start immediately. This can generate 2,000+ requests at once and essentially freeze the website / overwhelm the server.
  • Optimize bulk delete. It makes a single request, but takes a long time to complete (it is quite slow and inefficiently queues all the faces on the main thread).
  • Take a look at the database queries for time buckets and add any necessary indices.
  • Possibly merge interaction store into AssetStore, since there is a lot of overlap between loaded assets/buckets and selected assets/buckets.

@vercel
Copy link

vercel bot commented Aug 3, 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) Visit Preview Aug 4, 2023 5:10pm

@jrasm91 jrasm91 marked this pull request as ready for review August 4, 2023 13:46
@jrasm91 jrasm91 changed the title refactor(server,web): time buckets (1) refactor(server,web): time buckets for main timeline, archived, and favorites (1) Aug 4, 2023
@brighteyed
Copy link
Contributor

Earlier unarchived event from the AssetViewer was handled by the GalleryViewer. As I remember, it was implemented according to this comment. Also, I wonder if we need the archived-asset.store.ts dependency, so it can be removed

@jrasm91
Copy link
Contributor Author

jrasm91 commented Aug 4, 2023

Earlier unarchived event from the AssetViewer was handled by the GalleryViewer. As I remember, it was implemented according to this comment. Also, I wonder if we need the archived-asset.store.ts dependency, so it can be removed

Yeah, looks like it's not needed anymore. Unarchiving only requires additional action on the archiving page. I will gave to add something there to auto-advance the image though.

@alextran1502
Copy link
Contributor

The PR functionalities looks good to me, feel free to merge

@jrasm91 jrasm91 merged commit c6abef1 into main Aug 4, 2023
21 checks passed
@jrasm91 jrasm91 deleted the refactor/time-buckets-1 branch August 4, 2023 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants