Open matthiasballreich opened 2 years ago
If there is lightbox option for the gallery block, that would be wonderful. So we don't have to install another plugin, for that reason. Thank you.
That is a very good and helpful idea! @glendaviesnz Glen what are your thoughts around having a lightbox in the Gallery block?
It has been discussed, but not sure what priority currently is, have added this issue to the gallery improvements project.
@glendaviesnz Glen. Can you add a link to the Gallery Improvements project? Thanks.
+1 for this enhancement
@paaljoachim @glendaviesnz is there any chance this gets a higher priority soon?
I will go ahead and add the "Needs Design" label to it.
Now that WordPress 6.4 is out with the native lightbox option for individual images, it doesn't make any sense that it won't work for galleries as well, right?
@paaljoachim is there really a design needed for this?
maybe @artemiomorales or @t-hamano are able to give us an insight how much can be reused from the image component?
Hey @masteradhoc Brian. There is no need for a new design as the Lightbox option has been added to the Image block. I look forward to seeing this also in the Gallery block.
The Gallery block is essentially just a collection of Image blocks, so I think the main work here would be:
2. Implement a carousel. I think this would be a basic expectation of users as you don't really want to be opening and closing every image in the gallery, you most likely want to scroll through them once the lightbox is open
There should be a visible arrow, but also keyboard support for navigation.
Regarding this issue, I think it is necessary to consider the inheritance of lightbox.allowEditing
and lightbox.enabled
attributes.
Even if the Gallery Block's lightbox is controllable and enabled by default, what is the expected behavior if the Image Block's lightbox within it is disabled and is disabled by default?
For example, if theme.json
is defined as follows.
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"settings": {
"blocks": {
"core/gallery": {
"lightbox": {
"allowEditing": true,
"enabled": true
}
},
"core/image": {
"lightbox": {
"allowEditing": false,
"enabled": false
}
}
}
}
}
We may also need to consider #54858, which reports that lightbox settings do not work at the root level of theme.json.
For navigation I agree on having clickable left and right arrows, and keyboard support. As a bonus, is it also possible to make images swipe-able?
This is necessary for galleries with a lot of photos. (Actually we are going to build a site just like that.)
I don't want to rely on plugins just for lightbox. I also don't need fancy ones: just enlarge an image upon click/tap; have the ability to browse the gallery by clickable arrows or swiping; and easily close it when I want. Let's leave fancy for the plugins. WordPress core must be able to do the essentials!
Thank you!
Edit: I acknowledge the "Expand on click" feature which I believe was shipped with WP 6.4.
It would be very nice to have the Lightbox option for the gallery block. I now i can click on every single image inside the gallery block and enable there the lightbox option, but if i have many images, this ist not the best way. It would be much better to have the lightbox option for the whole gallery block.
This issue is related to the, lightbox option for the gallery block. I believe this gallery lightbox toggle was added and then removed. We need to add the option back - a toggle to open all gallery block images in the lightbox without having to click on each image individually. Or perhaps better yet, the option to select multiple images and be able to select link > open in lightbox
It would be very nice to have the Lightbox option for the gallery block. I now i can click on every single image inside the gallery block and enable there the lightbox option, but if i have many images, this ist not the best way. It would be much better to have the lightbox option for the whole gallery block.