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: Twenty Twenty-one Blocks layout is broken in editing view #48149

Closed
vindl opened this issue Dec 8, 2020 · 9 comments
Closed

Site Editor: Twenty Twenty-one Blocks layout is broken in editing view #48149

vindl opened this issue Dec 8, 2020 · 9 comments
Assignees
Labels
[Goal] Full Site Editing [Pri] High Address as soon as possible after BLOCKER issues [Type] Bug When a feature is broken and / or not performing as intended

Comments

@vindl
Copy link
Member

vindl commented Dec 8, 2020

The homepage layout looks off in the site editor when compared to what's rendered on the front end:

Screenshot 2020-12-09 at 00 40 18

@vindl vindl added [Type] Bug When a feature is broken and / or not performing as intended [Pri] High Address as soon as possible after BLOCKER issues [Goal] Full Site Editing labels Dec 8, 2020
@vindl vindl changed the title Site Editor: Twenty Twenty-one Blocks layout is broken in editor Site Editor: Twenty Twenty-one Blocks layout is broken in editing view Dec 8, 2020
@Addison-Stavlo
Copy link
Contributor

Took a quick look and this doesn't seem to be an issue with the theme but the starter content itself. I see the same problem on my site withe seedlet-blocks.

For some reason, every section of content is nested in a single column inside a layout grid:
Screen Shot 2020-12-11 at 12 45 09 PM

@Addison-Stavlo
Copy link
Contributor

or maybe an issue with the layout grid block in the site editor 🤔

@Addison-Stavlo
Copy link
Contributor

Addison-Stavlo commented Dec 11, 2020

Yup, so more specifically it seems to be related to the span setting for the layout-grid block. It seems like the CSS isnt properly being applied for this attribute in the site editor. That is, in the post editor the content looks correct, you may notice a span of "8" for a layout grid. Changing this to "1" will make it look like the broken layout in the site editor.

Screen Shot 2020-12-11 at 1 13 14 PM

Loading the site editor, you will see the setting for that layout grid is properly set, but changing that setting doesnt change anything visually and it always seems to render as if the span is 1.

@Addison-Stavlo
Copy link
Contributor

Addison-Stavlo commented Dec 14, 2020

Update - It seems the layout-grid block styles depend on the .block-editor class, which isn't added in the site editor (instead we have #edit-site-editor and .edit-site on this element).

It looks like Automattic/block-experiments#156 will fix this issue.
Also have this core PR open to see if we can just add the block-editor class to the site editor.

@david-szabo97
Copy link
Contributor

Leaving an update here:

@Addison-Stavlo
Copy link
Contributor

Addison-Stavlo commented Jan 13, 2021

Update - Automattic/block-experiments#156 is merged. Once the next release (newer than 1.3) goes out we can verify this is fixed and close.

@Addison-Stavlo Addison-Stavlo self-assigned this Jan 13, 2021
@vindl
Copy link
Member Author

vindl commented Jan 20, 2021

@Addison-Stavlo @jasmussen what's the timing and process for these releases?

@Addison-Stavlo
Copy link
Contributor

The version in the repo has been updated and is undergoing testing before the release (Automattic/block-experiments#156 (comment)). I'm not sure beyond that though.

@Addison-Stavlo
Copy link
Contributor

The underlying issue is fixed and the layout-grid now works properly in the site editor.

However, it looks like our FSE onboarding patterns no longer use the layout-grid block anyways. 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Goal] Full Site Editing [Pri] High Address as soon as possible after BLOCKER issues [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

3 participants