Disable the lightbox functionality for livetable/livedata

I am working on [XWIKI-19480] Disable Lightbox for profile, activity stream and livetable - XWiki.org JIRA , which was initially about some livetable loading bars and the avatar being displayed too many times inside the lightbox, but the title was modified to be more inclusive.
So as part of it, I wanted to disable the lightbox completely for livetable (which would mean that the same should be done for livedata as well) but after a discussion with Marius, the conclusion was that it might still contain images that the user would want to see in full screen and completly disabling it is not necessarly a clear solution.
To comply to this, the lightbox could be disabled only for specific parts (i.e. xwiki-livetable-pagination for livetable, image icons for livetable/livedata)
But this will lead to other problems, since when you go to the next livetable page, the new images will not be included inside the lightbox (lightbox listens to xwiki:dom:updated, but it is not trigerred in this case). Actually now the livedata images are not included at all inside the lightbox since it’s content is loaded too late. (I am opening a lightbox issue about the fact that it’s not considering images added after, I’ll link it here)

My question related to this problems is if you think the lightbox should be disabled or not completely for livetable/livedata. The options are:

  1. Disable the lightbox functionality for them
  2. Disable the lightbox only for the code parts that generate non-content images (xwiki-livetable-pagination for livetable, image icons for livetable/livedata) and add a fix for the images loaded after (maybe listen on livetable/livedata events for updates)
  3. Disable the default content lightbox for livetable/livedata and use a different lightbox instance for them, to handle their specific cases (this could be usefull for the attachments tab as well)

On my side, I think the third option would be the best, to be able to handle livetable / livedata specific cases separately, like being able to use this functionality outside the xwiki content.
Related to option 2, I think that having a livedata with many images displayed between other content images could lead to confusion.



My preference goes to 1 for now. I don’t think it makes sense to support LT/LD and if we ever want to support that, it’s a different feature, as it implies being able to cycle through all images of a LT/LD, even if they’re not in the currently loaded data that is visible (i.e. cycle through all images). It also means selecting which columns to displays images from. Last, it would be painful to mix these with the images added by user in the content proper.


Option 3 sounds best to me here. It’s even possible to go to solution 3 and disable it until the work is done.

I don’t agree here, the immediate UC I have in mind is being able to see the pictures of the displayed rows on a LT like Movies (Help.Applications.Movies.WebHome) - XWiki

I’m not sure it would be the expected behaviour: you could expect to only cycle through the displayed rows, and to need to switch page from the LD/LT to see other images from other pages.

In a first implem we could decide to cycle through all images of all columns of the LT. I don’t think supporting this UC would be a strong requirement.

And that’s why solution 3 is best :slight_smile:

In a first implementation we can do option 1. Nobody has asked for solution 3 AFAIK. It would be better to have a need rather than hurry to implement something that nobody has asked for. That’s unless we have a lot of time available, but I wouldn’t consider this a priority.

1 Like

I agree with @vmassol that for 14.8 we should do option 1 so that we can enable the Lightbox feature by default. On the long term I like option 3 because we already have the use case: the attachments live data, for which it would be nice to be able to view the image attachments full screen without leaving the page.