-
Notifications
You must be signed in to change notification settings - Fork 17
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
Always put thumb images in a lightbox #1406
base: main
Are you sure you want to change the base?
Conversation
- this commit puts all thumb images in a lightbox - additionally we now set the `data-gallery` so only the images belonging to one post are in a gallery together (which will currently always be one)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I trust you here, hopefully everything still works.
One thing I noticed is that opening the lightbox sometimes jumps to the bottom of the page, but only on mobile, not even with the mobile emulator. I gotta fix that first, cause it is really annoying when this is actively used... |
Clicking thumbnails will still open images, right? |
- Remove the lightbox call from the subject controller, as this is taken care of by the lightbox controller
Yes of course. This PR will let you click the thumb images in lists to get the lightbox containing the image. You can test it on gehirneimer.de I have it running there |
The scroll issue seems to be cause by the library and not our code. I created an issue for it: biati-digital/glightbox/issues/553 |
Can this be replicated with their demo site? https://biati-digital.github.io/glightbox/#examples if not, maybe it's not their library. |
I have lightbox disabled on my instance because it behaves poorly with large images in general and doesn't work properly on iphones. Scrolling/zooming in iirc was problematic |
No it cannot be replicated on their demo site, but that doesn't mean that it is not a library error. The super frustrating part is that is only on gehirneimer.de and I cannot even replicate it locally... |
Interestingly enough it seems like clearing the website data and cookies in my browser solved it. I had the error in FF and tried in Fennec without the problem, went ahead and delete the website data and cookies and not I don't have this problem in FF anymore... No idea where it came from, but if you cannot reproduce this problem on your phone @melroy89 I think we can safely merge this PR |
@TheVillageGuy do you have an iPhone and can test gehirneimer.de with the lightbox? I have no zoom problems on android, but I do not own or know anyone with an iPhone to test it... |
I actually also have 1 or 2 old iPhones I believe somewhere in home. I could try to test it myself as well on an old iPhone. |
That would be great :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no issues with the lightbox feature under iPhone 6s under Safari web browser. The images are opening in lightbox, and I'm able to close the box again. Everything seems to work fine.
@BentiGorlich One improvement would be that if you click outside of the image when in lightbox, the box should also close..? So you don't necessarily need to use the 'X' icon. |
The question with using an iPhone was whether zooming and moving the image is also working fine. As for the click outside: that is actually a bug. I could implement the fix someone mentioned in the issue I created, but on desktop clicking outside the lightbox closes it |
Owh, my bad. Let me test that as well now. I will also try to load maybe some large images like these posts with maps from rim world. |
I can confirm that zooming as well as panning works as expected, no issues on this iPhone 6s in Safari. |
|
I don't know anything about iPhones but I'd recommend testing on older models as well |
I AM testing it on a very old iPhone. Like I said an iPhone 6s from 2015. We currently are already at iPhone 16. |
Oh excellent, in that case maybe the lightbox developers have done something with my feedback at the time |
data-gallery
so only the images belonging to one post are in a gallery together (which will currently always be one)Closes #1127