Gutenberg: Gallery Block: Missing 'Random Order' setting

Created on 7 Sep 2018  路  7Comments  路  Source: WordPress/gutenberg

In the classic editor, when I go to set up a WordPress image gallery, there are "Gallery Settings" for "Link To", number of "Columns", "Random Order", "Size", and "Type" ("Thumbnail Grid", "Slideshow"). Those settings are missing in Gutenberg Version 3.7.0 when using the "Gallery" block.

Related: The captions on the Gutenberg "Gallery" block are styled so that the caption hangs oddly over the image. The images also can't be clicked on (possibly because there is no "Link To" option, as mentioned).

To Reproduce
Steps to reproduce the behavior:

  1. Use the 'Gallery' block
  2. Click on 'Media Library'
  3. Select Images
  4. Click on 'Create a new gallery'
  5. Now you are on the final gallery set-up page. Above the 'Insert Gallery' button is a blank area鈥攊n that blank area is where the settings I mentioned would normally appear in the classic editor.

Expected behavior
I expected the Gutenberg "Gallery" block to have "Gallery Settings" so that I'd have control over the following options: "Link To", number of "Columns", "Random Order", "Size", and "Type" ("Thumbnail Grid", "Slideshow").

Screenshots
screen shot 2018-09-07 at 1 15 37 pm
screen shot 2018-09-07 at 1 16 27 pm
screen shot 2018-09-07 at 1 17 34 pm

Desktop (please complete the following information):

  • OS: iOS
  • Browser: Firefox
  • Version: 61.0.2

Additional Context

  • I'm on the Genesis framework
Backwards Compatibility [Block] Gallery [Type] Enhancement

All 7 comments

I've replicated this bug against master on a vanilla install. No console errors so bug will require some discovery.

Gallery settings were hidden in PR #1978, because Gutenberg didn't use them. I believe settings should now be made in post edit -screen after images are inserted to gallery:

nayttokuva 2018-09-30 kello 14 54 50

I wasn't able to replicate the front-end issue. I tested in desktop Chrome and Firefox with Gutenberg 3.9.0 (master branch) and twentyseventeen -theme. Could caption-gradient -issue be relating to Genesis framework?

Aren't we missing the "order" settings? Like inverse order and such?

Aren't we missing the "order" settings? Like inverse order and such?

Yes. It would be great to have back the orderby parameter like the gallery shortcode has. Any chance we could get this in?

Please bring back the random order setting.

Here's what is in gallery settings when using the classic editor:

Screen Shot 2020-04-21 at 17 03 44

And here's what is in gallery settings using the latest development version of the block editor:

Screen Shot 2020-04-21 at 17 03 53

The only missing setting is _Random Order_. It's difficult to implement this in the gallery block right now, though, as it is a static block that does not use the [gallery] shortcode.

We could look into making the gallery block dynamic. I'm not totally convinced, though, that supporting _Random Order_ is worth the complexity and performance penalty that making this block dynamic would add.

One way around some of that complexity would be to wait until the gallery block uses inner blocks. The render_callback would then only have to shuffle an array instead of parse gallery HTML.

For now, the workaround here is to use the shortcode block to insert a [gallery] shortcode.

I'm happy using the classic mode till something can be figured out but it would be nice if this was in the block settings. Having random images in sites is cool. Especially design sites.

Was this page helpful?
0 / 5 - 0 ratings