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

Tracking: Aspect Ratio #48079

Open
9 of 13 tasks
Tracked by #33447
richtabor opened this issue Feb 14, 2023 · 3 comments
Open
9 of 13 tasks
Tracked by #33447

Tracking: Aspect Ratio #48079

richtabor opened this issue Feb 14, 2023 · 3 comments
Labels
[Block] Image Affects the Image Block [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 [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.

Comments

@richtabor
Copy link
Member

richtabor commented Feb 14, 2023

Why aspect ratios

When you add a pattern from the directory to a page, then replace any images with one of your own, the new images are unlikely to fit within the intended design of the pattern. I.e. square images in the pattern won't be square — unless you crop your image further in the editor. The expectation is that you can replace images without breaking the layout.

This would be especially beneficial for wireframe-style patterns, where an image placeholder could be represented accurately in size and ratio. Patterns actually wouldn't need to include images altogether.

In the current state, the aspect ratio control exists within the core/post-featured-image block. Ideally the aspect ratio control would be exposed to other image-like blocks (and their placeholder states).

Theme.json aspect ratios

As detailed in #38990 (comment), the available aspect ratio options should be customizable from the theme.json file.

This way the available ratios could be tailored to a specific site's design language, or new aspect ratios could be added. The expectation here the aspect ratios would be shared across any aspect ratio controls (including the hard-crop image edit control).

Priority

Secondary

@richtabor richtabor added [Block] Image Affects the Image Block [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. [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 Feb 14, 2023
@annezazu annezazu mentioned this issue Apr 17, 2023
57 tasks
@mtias mtias mentioned this issue Aug 2, 2023
65 tasks
@richtabor
Copy link
Member Author

Ensure that srcset still works correctly with aspect ratio enabled

Confirmed this is working as expected:

CleanShot 2023-10-04 at 14 50 29
CleanShot 2023-10-04 at 14 50 24

@fabiankaegy
Copy link
Member

Hey @richtabor 👋

What's currently blocking us from moving forward with a spec for defining aspect ratio sizes in theme.json?

In the PR you mention there are some thing to be worked out first but I'm not finding any further insights about what they are.

Any insights would be greatly appreciated.

We are very interested in helping move this forward as it is a very common issue we encounter in the enterprise world where style guides call for specific aspect ratios

@jasmussen
Copy link
Contributor

Now that the Cover block has aspect ratio support, it'd be nice to revisit the flyout (#48110) so there's some preview of the shape.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [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 [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Projects
No open projects
Status: Punted to 6.5
Development

No branches or pull requests

3 participants