Opened 4 years ago

Last modified 19 months 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.

Subtickets

Attachments (1)

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

Download all attachments as: .zip

Change History (8)

comment:1 Changed 4 years ago by Saksham Agrawal

I would like to work on this enhancement

comment:2 Changed 4 years ago by Christopher Allan Webber

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 Changed 4 years ago by Saksham Agrawal

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 Changed 4 years ago by Christopher Allan Webber

Okay, sounds good saksham1115! Go for it!

comment:5 Changed 4 years ago by Saksham Agrawal

I have uploaded the patch.

comment:6 Changed 4 years ago by Saksham Agrawal

Status: newreview

comment:7 Changed 19 months ago by ayleph

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.
Note: See TracTickets for help on using tickets.