Gallery: Improve mobile lightbox with animated swiping - #79114
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Size Change: +1.32 kB (+0.02%) Total Size: 7.76 MB 📦 View Changed
|
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
c6eca7d to
022d8e4
Compare
|
Rebased, and worked in some small improvements. |
|
Flaky tests detected in 022d8e4. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/30269701069
|
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
022d8e4 to
0b51fe4
Compare
|
It works well for me. It would be nicer if, after a certain number of pixels of swiping, the next/prev image is revealed to make the transition smoother and reinforce the swipe direction. Right now, the new image shows up slightly abruptly. |
I agree. When I worked on that, this aspect was a bit of a larger undertaking, so in the hopes of making this a small iterative improvement, I chose this simpler approach. But it should be possible to upgrade it with a second PR. Curious if we can get a developer instinct on this, happy either way. |
What?
Followup to #62906. Adds animation to the swiping gesture for mobile galleries:

Why?
When you have a gallery set to lightbox ("expand on click"), no mobile you can open it and use a swipe gesture to advance between images. However there is no visual feedgback that this is possible. This PR adds that.
Testing Instructions
Create a gallery, set to expand on click, then test on mobile, or using the web-inspector set to device emulation. Test swiping images to advance.
Use of AI Tools
Claude Opus 4.7.