Skip to content

feat(web): don't scroll to visible assets#20729

Merged
alextran1502 merged 1 commit intomainfrom
chore-web-dont-scroll-visible-assets
Aug 6, 2025
Merged

feat(web): don't scroll to visible assets#20729
alextran1502 merged 1 commit intomainfrom
chore-web-dont-scroll-visible-assets

Conversation

@uhthomas
Copy link
Copy Markdown
Collaborator

@uhthomas uhthomas commented Aug 6, 2025

Description

The timeline has been quite aggressive with scrolling to assets, even if they were right in the middle of the page. If the asset is visible, then we shouldn't scroll to it. It's really confusing when assets jump around after being viewed.

How Has This Been Tested?

I tested it locally.

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/)

@uhthomas uhthomas force-pushed the chore-web-dont-scroll-visible-assets branch 4 times, most recently from b17ebe6 to ec9579f Compare August 6, 2025 19:14
@uhthomas
Copy link
Copy Markdown
Collaborator Author

uhthomas commented Aug 6, 2025

We could make this a bit better by adding the asset height into the calculation, as right now it jumps to assets which are half visible at the top. I didn't see a function to get the height rather than just the calculated position, so I think it's fine for now as it would need more code changes.

The timeline has been quite aggressive with scrolling to assets, even if they
were right in the middle of the page. If the asset is visible, then we
shouldn't scroll to it. It's really confusing when assets jump around after
being viewed.
@uhthomas uhthomas force-pushed the chore-web-dont-scroll-visible-assets branch from ec9579f to 3edd256 Compare August 6, 2025 19:20
@uhthomas uhthomas changed the title chore(web): don't scroll to visible assets feat(web): don't scroll to visible assets Aug 6, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 6, 2025

Deploying preview environment to https://pr-20729.preview.internal.immich.cloud/

@alextran1502 alextran1502 merged commit 1193a23 into main Aug 6, 2025
58 checks passed
@alextran1502 alextran1502 deleted the chore-web-dont-scroll-visible-assets branch August 6, 2025 21:31
@github-actions github-actions bot removed the preview label Aug 6, 2025
ollioddi pushed a commit to ollioddi/immich that referenced this pull request Aug 11, 2025
The timeline has been quite aggressive with scrolling to assets, even if they
were right in the middle of the page. If the asset is visible, then we
shouldn't scroll to it. It's really confusing when assets jump around after
being viewed.
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.

2 participants