-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lightbox option for gallery block #37652
Comments
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! |
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:
|
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 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 {
"$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. |
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 |
Check out this PR which adds the same Image block link feature to the Gallery block. (Also includes Expand on click - lightbox feature.) |
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.
The text was updated successfully, but these errors were encountered: