[PR #19214] fix(web): more refactoring and tweaking of the memory viewer. #16012

Closed
opened 2026-02-05 15:58:16 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/immich-app/immich/pull/19214

State: closed
Merged: Yes


Description

Refactor asset viewing in memory page.

Split photo and video viewing into separate components to ensure they
work similarly to the assets viewer. The previous implementation faded
out the assets, while the assets-viewer only fades assets in. For
images, add a spinner while waiting for the image to load, before adding
the image to the DOM. For videos, add the video to the DOM after
mounting the component. In both cases, the assets fade in smoothly, like
the regular assets viewer.

Fix video fade-in for video-native-viewer

The previous implementation never actually faded in the video element.
Fix this by ensuring the video element is only added to the DOM after
mounting, so Svelte can handle the fade-in transition correctly.

These changes should hopefully fix the comment by @alextran1502 in #19184

How Has This Been Tested?

Tested locally in chrome with and without cache enabled. Also tested by throttling my network to see how it behaves for slow clients.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)
**Original Pull Request:** https://github.com/immich-app/immich/pull/19214 **State:** closed **Merged:** Yes --- ## Description ### Refactor asset viewing in memory page. Split photo and video viewing into separate components to ensure they work similarly to the assets viewer. The previous implementation faded out the assets, while the assets-viewer only fades assets in. For images, add a spinner while waiting for the image to load, before adding the image to the DOM. For videos, add the video to the DOM after mounting the component. In both cases, the assets fade in smoothly, like the regular assets viewer. ### Fix video fade-in for video-native-viewer The previous implementation never actually faded in the video element. Fix this by ensuring the video element is only added to the DOM after mounting, so Svelte can handle the fade-in transition correctly. These changes should hopefully fix the comment by @alextran1502 in #19184 ## How Has This Been Tested? Tested locally in chrome with and without cache enabled. Also tested by throttling my network to see how it behaves for slow clients. ## Checklist: - [X] I have performed a self-review of my own code - [X] I have made corresponding changes to the documentation if applicable - [X] I have no unrelated changes in the PR. - [X] I have confirmed that any new dependencies are strictly necessary. - [X] I have written tests for new code (if applicable) - [X] I have followed naming conventions/patterns in the surrounding code - [X] All code in `src/services/` uses repositories implementations for database calls, filesystem operations, etc. - [X] All code in `src/repositories/` is pretty basic/simple and does not have any immich specific logic (that belongs in `src/services/`)
OVERLORD added the pull-request label 2026-02-05 15:58:16 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#16012