Skip to content

Improve scrolling UX when exiting photo lightbox #3550

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

Merged
merged 2 commits into from
Jul 24, 2025

Conversation

cdzombak
Copy link
Contributor

Prior to this PR, the album page unconditionally scrolled when exiting the photo lightbox. This scrolling was jarring — the page appeared to jump instantly — and often scrolled the page for no reason, since the photo might have been visible already.

This PR makes this scrolling logic smarter. Now:

  • scrolling only happens if the photo that was viewed isn't fully visible already
  • scrolling happens smoothly
  • the minimum amount of scrolling necessary to make the photo visible is used

@cdzombak cdzombak requested a review from a team as a code owner July 21, 2025 01:07
@cdzombak
Copy link
Contributor Author

GIF demonstrating new scroll behavior

Copy link

codecov bot commented Jul 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.86%. Comparing base (40a92b5) to head (ed1afc9).
Report is 6 commits behind head on master.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ildyria ildyria merged commit d5037d2 into LycheeOrg:master Jul 24, 2025
25 checks passed
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.

2 participants