Skip to content
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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

BentiGorlich
Copy link
Member

  • this commit puts all thumb images in a lightbox (so you can now click the thumb image in a list to open a lightbox of the image)
  • 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)

Closes #1127

- 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)
@BentiGorlich BentiGorlich added enhancement New feature or request frontend Visual issues, improvements, bugs or other aspects relating mostly to the front end labels Jan 31, 2025
@BentiGorlich BentiGorlich self-assigned this Jan 31, 2025
melroy89
melroy89 previously approved these changes Feb 8, 2025
Copy link
Member

@melroy89 melroy89 left a 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.

@BentiGorlich
Copy link
Member Author

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...

@BentiGorlich BentiGorlich enabled auto-merge (squash) February 8, 2025 13:52
@melroy89 melroy89 dismissed their stale review February 8, 2025 14:08

Problems on mobile

@BentiGorlich BentiGorlich disabled auto-merge February 8, 2025 14:38
@melroy89 melroy89 added this to the v1.8.1 milestone Feb 10, 2025
@TheVillageGuy
Copy link
Contributor

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
@BentiGorlich
Copy link
Member Author

Clicking thumbnails will still open images, right?

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

@BentiGorlich
Copy link
Member Author

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

@melroy89
Copy link
Member

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.

@TheVillageGuy
Copy link
Contributor

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

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

@BentiGorlich
Copy link
Member Author

Can this be replicated with their demo site? https://biati-digital.github.io/glightbox/#examples if not, maybe it's not their library.

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...

@BentiGorlich
Copy link
Member Author

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

@BentiGorlich
Copy link
Member Author

@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...

@melroy89
Copy link
Member

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

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.

@BentiGorlich
Copy link
Member Author

That would be great :)

Copy link
Member

@melroy89 melroy89 left a 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.

@melroy89
Copy link
Member

melroy89 commented Feb 14, 2025

@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.

@BentiGorlich
Copy link
Member Author

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

@melroy89
Copy link
Member

The question with using an iPhone was whether zooming and moving the image is also working fine.

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.

@melroy89
Copy link
Member

I can confirm that zooming as well as panning works as expected, no issues on this iPhone 6s in Safari.

@TheVillageGuy
Copy link
Contributor

TheVillageGuy commented Feb 14, 2025

@TheVillageGuy do you have an iPhone
No, sorry, I don't

@TheVillageGuy
Copy link
Contributor

TheVillageGuy commented Feb 14, 2025

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

@melroy89
Copy link
Member

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.

@TheVillageGuy
Copy link
Contributor

TheVillageGuy commented Feb 14, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend Visual issues, improvements, bugs or other aspects relating mostly to the front end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inline image view
3 participants