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

Featured Image: Allow free-form resizing & scaling properties #31418

Closed
jasmussen opened this issue May 3, 2021 · 5 comments
Closed

Featured Image: Allow free-form resizing & scaling properties #31418

jasmussen opened this issue May 3, 2021 · 5 comments
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] Media Anything that impacts the experience of managing media

Comments

@jasmussen
Copy link
Contributor

What problem does this address?

The Featured Image block when used on archive pages (as part of the Query block) can help make such views much more interesting:

115060270-aafe6500-9eb5-11eb-96db-c6e67f591226

GIF courtesy of @kjellr from here.

However the the lack of dimension controls on the featured image block means individual image aspect ratios are unchanged, causing a bit of a jumpy layout:

Screenshot 2021-05-03 at 11 28 55

What is your proposed solution?

If we enable dimension controls and allow object-fit properties to be configured (defaulting to cover), we can enable some much more coherent and nice layouts. Shown here with some custom border radii applied as well:

Screenshot 2021-05-03 at 11 13 35

Here's what the featured image inspector controls could look like:

Featured Image

@jasmussen jasmussen added [Feature] Media Anything that impacts the experience of managing media [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Block] Post Featured Image Affects the Post Featured Image Block labels May 3, 2021
@kjellr
Copy link
Contributor

kjellr commented May 3, 2021

This might be a duplicate of #27620? It's similar at least.

I definitely like the idea of the scale control. 👍

@jasmussen
Copy link
Contributor Author

There's definitely DNA shared between those, sorry I didn't find that older one. I'm happy to close this one in favor of it, but it might be worth doing a merge of sorts? This ticket specifically embraces the image element and object-fit property, which should be conducive to the current markup.

@kjellr
Copy link
Contributor

kjellr commented May 3, 2021

Yeah, I think that makes sense. We can port this idea over to that issue — in general the issue is that we need any sort of image controls for the featured image. 🙂

@jasmussen
Copy link
Contributor Author

Cool I'll take a stab as soon as I have a moment, and I'll close this one. (Or feel free if you have bandwidth now)

@jasmussen
Copy link
Contributor Author

Closing this one in favor of #27620.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] Media Anything that impacts the experience of managing media
Projects
None yet
Development

No branches or pull requests

2 participants