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

Site Editor: Image Block lacks alignment controls #38802

Closed
annezazu opened this issue Feb 15, 2022 · 5 comments
Closed

Site Editor: Image Block lacks alignment controls #38802

annezazu opened this issue Feb 15, 2022 · 5 comments
Labels
[Block] Image Affects the Image Block [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release

Comments

@annezazu
Copy link
Contributor

Description

This came up as part of the FSE Outreach Program's All Things Media exploration:

When adjusting images on FSE, there is no settings for alignment, which was present in Post editor.

Possibly related: #38557

Step-by-step reproduction instructions

  1. Open the site editor
  2. Add an image
  3. Notice in the toolbar there's no option to change alignment.

Screenshots, screen recording, code snippet

Screen Shot 2022-02-14 at 8 57 44 PM

Environment info

  • WordPress 5.9
  • TT2
  • Chrome
  • MacOS

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@annezazu annezazu added [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release [Block] Image Affects the Image Block labels Feb 15, 2022
@Mamaduka
Copy link
Member

I think inside the template, individual blocks need containers (Group or similar) for alignment.

We need to document the Layout and Alignment relation somewhere. I don't remember if there was a "Make/Core" post related to this change.

Cc @youknowriad, @ntsekouras.

@ntsekouras
Copy link
Contributor

I think inside the template, individual blocks need containers (Group or similar) for alignment.

That's true. The alignments depend on their container and in site editor we assume there is no container because that's the whole page in front end. What this means is that by default root level blocks take all the available space which is 100%.

In post editor we already have a container and the layout config is used. So if a theme defines layout: { contentWidth: something, wideWidth: something } in theme.json, that's the layout config that gets applied in the post editor.

The dev note for layouts is here: https://make.wordpress.org/core/2021/06/29/on-layout-and-content-width-in-wordpress-5-8/

@Mamaduka
Copy link
Member

Thanks, Nik.

@annezazu
Copy link
Contributor Author

annezazu commented Feb 17, 2022

Hmm this definitely seems to result in a confusing experience! The same person also reported the following:

When inserting YouTube block over a cover image, right align doesn’t work. Same happens with other media contents over the cover image. /imgur /image

It's not quite intuitive that one needs to add a Group block > Cover block > Image block in order to have this work properly.

Is this "working as expected" and more of a design experience to help guide folks to know what to do? Curious how to move this forward but that seems best from what I'm seeing :) One thought is to just defer to this issue on simplifying the layout concept but that doesn't help the initial problem of folks not knowing they need to add a container block in the first place: #36082

@annezazu
Copy link
Contributor Author

Going to close this out and defer to the simplifying layout controls issue.

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 [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

No branches or pull requests

3 participants