Skip to content
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

New Block: Flowing Masonry Gallery #28247

Open
melchoyce opened this issue Jan 15, 2021 · 1 comment
Open

New Block: Flowing Masonry Gallery #28247

melchoyce opened this issue Jan 15, 2021 · 1 comment
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images New Block Suggestion for a new block [Type] Enhancement A suggestion for improvement.

Comments

@melchoyce
Copy link
Contributor

What problem does this address?

A common trend on sites today is a flowing, spacious masonry gallery, often with some images overlapping:

Golden Venum Martin Schwaibold Laura McCluskey
image image image

@kjellr tried to make this kind of pattern (with overlapping images) work in Twenty Twenty-One with the gallery block, but we ended up having to scrap it and instead use columns. This solution worked for the theme but overall wasn't great because it meant you couldn't just upload a bunch of images and have the block intelligently arrange them for you. It also lacks the sophisticated reflow we'd get on mobile if we were able to use a CSS Grid-based gallery.

What is your proposed solution?

I'm wondering if it would be possible to make a unique block, separate from Gallery, to handle the necessary HTML structure to create a kind of flowing, overlapping masonry gallery like this. I think it would be a strong show of good design from WordPress core. Maybe something we could explore?

@melchoyce melchoyce added New Block Suggestion for a new block [Block] Gallery Affects the Gallery Block - used to display groups of images labels Jan 15, 2021
@glendaviesnz
Copy link
Contributor

Another possibility which has been discussed is to modify the innerBlocks api somehow to allow a different element structure to be passed. Initial investigations indicated that it wasn't possible to get a tiled or masonry gallery purely with CSS, but it seems a shame to have to recreate the whole block just to get a different layout.

The other advantage is that this additional api may be useful for other uses of innerBlocks.

This idea is a very vague theory at the moment and needs some investigation and prototyping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images New Block Suggestion for a new block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants