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

Improve Image Blocks Placeholders #41142

Closed
beafialho opened this issue May 18, 2022 · 6 comments · Fixed by #43180
Closed

Improve Image Blocks Placeholders #41142

beafialho opened this issue May 18, 2022 · 6 comments · Fixed by #43180
Assignees
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Block] Gallery Affects the Gallery Block - used to display groups of images [Block] Image Affects the Image Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Needs Design Needs design efforts.

Comments

@beafialho
Copy link

What problem does this address?

Chatting with @mtias @henriqueiamarino and @pablohoneyhoney about the effort of populating the Pattern Directory, it makes sense to also pursue more common layouts, displaying them as wireframes, in addition to more opinionated combinations of image and copy. Because of that, the way the images blocks get displayed is important.

This is the current Image block placeholder:

Captura de ecrã 2022-05-17, às 12 00 15

What is your proposed solution?

For Images (and perhaps Cover and Gallery Blocks), it would be nice to improve the placeholder directly in Gutenberg, perhaps add things like aspect ratio, nicer placeholder drop-zone, etc so we could display it in the directory, instead of adding sample images, as shown below.

It can be relevant to align these placeholders with the ones created for other blocks such as Featured Images.

Captura de ecrã 2022-05-17, às 12 00 46

@beafialho beafialho added Needs Design Needs design efforts. [Block] Cover Affects the Cover Block - used to display content laid over a background image [Block] Image Affects the Image Block [Block] Gallery Affects the Gallery Block - used to display groups of images [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels May 18, 2022
@Mamaduka
Copy link
Member

Related #23124.

@mtias
Copy link
Member

mtias commented May 21, 2022

There are also some functional things we should support on placeholder — like setting width / height, aspect ratio, border radius, and any other properties that would make sense before having a src set.

@colorful-tones
Copy link
Member

There may be some confusion here, because this issue begins by mentioning "the Pattern Directory", but also clarifies: "For Images (and perhaps Cover and Gallery Blocks), it would be nice to improve the placeholder directly in Gutenberg,".

There is a need for improving the overall Placeholder component, and certainly #23124 would be an ideal area to start as a phase I enhancement, but also propagating with a randomly selected photo from Openverse would help support pattern creation (see #42006), as well as the everyday builder Gutenberg editor experience of inserting an Image block (and Gallery, Featured Image block as well).

@beafialho
Copy link
Author

There is no confusion, the effort of populating the Pattern Directory was mentioned for context on the need of this idea.

It does seem that this issue is similar to the ones you mentioned, which supports the interest in working on it 👍

@jasmussen
Copy link
Contributor

I've taken a stab at this one in #43143, that branch currently looks like this:

184115782-a46b70e0-5f76-4235-9acc-a4d744d107c4

Missing from that PR are some of the features from #42847, which allows inheriting border and radius. Width/height should already be inherited, but those need to be surfaced in the setup state in order for that to work. Would love to pair on making these things happen in one or two PRs.

@mtias
Copy link
Member

mtias commented Aug 18, 2022

Nice, thanks for the tweaks. Now we need to get the "constrain image to dimensions / aspect ratio" issue sorted and we'd be in a great place :)

@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Block] Gallery Affects the Gallery Block - used to display groups of images [Block] Image Affects the Image Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Needs Design Needs design efforts.
Projects
No open projects
6 participants