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

Left and right alignments missing in the block editor when running FSE themes #30568

Closed
andersnoren opened this issue Apr 7, 2021 · 6 comments · Fixed by #32810
Closed

Left and right alignments missing in the block editor when running FSE themes #30568

andersnoren opened this issue Apr 7, 2021 · 6 comments · Fixed by #32810
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@andersnoren
Copy link

Description

When running TT1 Blocks or the Empty Theme, the left and right alignments are not available for images, galleries, covers, etc.

Step-by-step reproduction instructions

  1. Install TT1 Blocks and create a new block.
  2. Add any block that usually supports left/right alignments, and click the "Change Alignment" button.

Expected behaviour

Left and right alignments should be there.

Actual behaviour

They aren't :)

Screenshots or screen recording (optional)

image

WordPress information

  • WordPress version: 5.7
  • Gutenberg version: 10.3.2
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes, TT1 Blocks

Device information

  • Device: Desktop
  • Operating system: MacOS
  • Browser: Safari 14.0.3
@skorasaurus
Copy link
Member

confirmed with gutenberg 10.4.1

@skorasaurus skorasaurus added [Type] Bug An existing feature does not function as intended and removed Needs Testing Needs further testing to be confirmed. labels Apr 19, 2021
@carolinan
Copy link
Contributor

If you place the image block inside a group block (or query, or template part), the options depend on the layout settings in the parent block.

  • Without changes to the layout settings, you can only align the image to the left, center, or right.
  • When the layout setting inherits the width from experimental-theme.json, you can only set the image's width to default, wide or full width.
  • When the content width and wide width have been specified, the image's width is adjusted and can only be set to default, wide or full width.

It is not possible to set the parent block to inherit the default width, and align the inner block to the left, center or right inside that width constraint.
This is the part I am not sure about if it is a bug or not.

I am not able to place an image, align it, and have a text next to it without columns.
This is no longer possible:
Twenty Twenty-One, without Gutenberg active
Aligned image and text

Empty theme, with Gutenberg (current trunk) active:
image is not aligned

@kjellr
Copy link
Contributor

kjellr commented Jun 17, 2021

This definitely seems like a bug to me. @jasmussen / @youknowriad, can you confirm though? I don't know why left/right/center alignments would need to disappear regardless of the layout settings.

@youknowriad
Copy link
Contributor

The reason we removed these alignments from containers with a layout defined is because "float left" and "float right" here will behave differently than what folks are used to: the blocks will be aligned completely at the left or right of the container and not at the left of the "content size" area. If that's something folks are ok with, we can bring these back, it's a small change.

@kjellr
Copy link
Contributor

kjellr commented Jun 17, 2021

I think we might as well include it — some themes handle floats like that anyway, and I found it confusing to see these options missing.

@jasmussen
Copy link
Contributor

I don't have a strong opinion, but wanted to note that if we are able to bring some CSS grid to the block editor at some time in the future, floats will have to be wrapped in containers such as group in order to work. So it's something to revisit in case the layout becomes aware of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants