Enable the lightbox view for images by default

Hello all,

Starting with 14.1RC1, the Image lightbox was added as part of XWiki, as disabled by default. It was done like this initially since it was new (to have it tested first) and also because it could have interfered with features that display images for other purposes. But this was solved with [XWIKI-19436] Add the possibility to disable the lightbox feature for specific content - XWiki.org JIRA and some other problems were fixed as well, making the lightbox more stable.

Considering this, I propose to make it now enabled by default, since it’s a nice feature and it would be easier for users to discover it.
It can also be easily disabled from the Administration section

Jira issue: [XWIKI-20092] Enable the lightbox view for images by default - XWiki.org JIRA

WDYT?

Thanks,
Lavinia

I notice two issues related to Lightbox ([XWIKI-19469] The size of the image download and open Lightbox links is too small - XWiki.org JIRA, [XWIKI-19480] Lightbox gallery displays many times the profile picture and additional ones - XWiki.org JIRA). I don’t think they block enabling it by default, but it could be interesting to fix them before 14.8RC1.

+1, Thanks

+1, and yes, it would be nice to fix the 2 issues listed by @mleduc .

Thanks,
Marius

+1 thanks

+1

Thanks,
Alex

AFAIU this issue was to add the ability to disable the lightbox view for some images and that the lightbox is used for all images unless they have the data-xwiki-lightbox attribute set.

Was this attribute set in places of XS where images are not content images? Do we still have places to fix?

Otherwise, I’m fine to enable it by default as I think it’s a nice feature that would benefit being turned on by default.

Thanks

The attribute was not used anywhere in XS by now, from what I know

But as I said on the jira issue, currently there is one issue to fix about the lightbox being wrongly displayed [XWIKI-19480] Lightbox gallery displays many times the profile picture and additional ones - XWiki.org JIRA (I already added a comment, it should be a quick fix)

ok so we need to be prepared to fix other places when they are found I guess.

I’ve also added a comment at [XWIKI-19480] Lightbox gallery displays many times the profile picture and additional ones - XWiki.org JIRA

I think we need to address it ASAP as it’ll become harder and harder to make changes otherwise if we want to. I guess it could be argued that we’re still in the “young api” timeframe ATM.

BTW that’s why I thought it was nicer to only display the lightbox on rendering-generated images since they’re already marked as such.

I replied on JIRA. I don’t see it as a problem. I prefer the dedicated, clear and semantic data-xwiki-lightbox rather than a generic data-xwiki-notcontent that is harder to define and understand and can cause us problems later (when you want to exclude some type of “non-content” but not all).

@mflorea could you remind me quickly as to why we didn’t just include the rendering-generated images for the lightbox selection of images by default? (since that would have removed this dependency issue)

@vmassol see Support the disabling of the lightbox feature instead of adding it only to specific rendered content for the complete discussion on it

I think there are 2 main reasons to exclude from the lightbox some images that appear inside the page content:

  • they are not content images but rather used for UI purpose (icons, “background” images); most of the time these are images that have not been inserted directly by the user but indirectly by executing a macro
  • the behavior of the lightbox (e.g. mouse over image, click, etc.) conflicts with some custom behavior associated with those images (e.g. a macro inserts an image map that the user can interact with and doesn’t want the lightbox to break or complicate the interaction)

It doesn’t matter whether these images were generated with the image syntax or with HTML macro, in both cases you may want to exclude some of them from the lightbox.

Thanks,
Marius