Opened 8 years ago

Last modified 3 years ago

#5434 accepted enhancement

Lightbox effect for images

Reported by: Saksham Agrawal Owned by:
Priority: minor Milestone:
Component: graphic design/interface Keywords:
Cc: Parent Tickets:

Description

Adding lightbox effect for images would be a good enhancement.

Attachments (1)

0005-0001-Fix-for-issue-5434-Lightbox-effect-for-images.patch (4.8 KB ) - added by Saksham Agrawal 8 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by Saksham Agrawal, 8 years ago

I would like to work on this enhancement

comment:2 by Christopher Allan Webber, 8 years ago

It could be indeed be quite good. What approach are you thinking to adding it?

(Also, is this a duplicate of #574 or are they different?)

comment:3 by Saksham Agrawal, 8 years ago

Basically using Javascript or Jquery, when a user clicks on the image, create a box in the middle of the window where the image is displayed and changing the opacity of all the things in the backdrop. I think this will be the most easiest approach.

Reg #574:
I think spaetz is suggesting that we also add slideshow to the lightbox effect (Eg. Facebook image slideshow). I think this will be a good enhancement after lightbox effect is added. But we would need to give it a little thought as a slideshow is already there. So if the user uses the lightbox slideshow, then what image will be displayed (in the backdrop) when the user ends the lightbox effect

comment:4 by Christopher Allan Webber, 8 years ago

Okay, sounds good saksham1115! Go for it!

comment:5 by Saksham Agrawal, 8 years ago

I have uploaded the patch.

comment:6 by Saksham Agrawal, 8 years ago

Status: newreview

comment:7 by ayleph, 6 years ago

Status: reviewaccepted

I finally had a chance to try this out. It's a pretty neat idea, but it needs some more polishing. Here are some problems I noticed.

  • It doesn't preserve the aspect ratio of the image, so some pictures get stretched weird in lightbox mode. Try this with a portrait image to see what I mean.
  • Sometimes it's slow to load the lightbox. I've tried this on two different installations of MediaGoblin on two different servers with the same results.
  • I don't see any way to see the image full-size when the lightbox is active. Without the lightbox, I can click on an image to zoom in full size. With the lightbox, I can't zoom into large images unless I right-click to open in a new tab.
  • It's not intuitive how to exit the lightbox. I expected the Escape key would exit, but I had to click outside the lightbox to return to normal view.

comment:8 by Ben Sturmfels, 4 years ago

See also #5606

comment:9 by Ben Sturmfels, 3 years ago

Closing duplicate #5606.

We have some code for a lightbox popup that was added, but doesn't seem to have ever been hooked up:

mediagoblin/static/js/lightbox.js

We should probably hook it up or just delete it - no point having unused code laying around.

Note: See TracTickets for help on using tickets.