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

Pattern Submission: Can not set full alignment for nested Cover block #457

Closed
webmandesign opened this issue Mar 23, 2022 · 6 comments
Closed

Comments

@webmandesign
Copy link

Describe the bug
It seems like I am unable to set full alignment for nested Cover block (Cover within Cover, for example). The "full-width" option is missing for this child Cover block in editor.

Currently I need to set actual alignfull class manually on the nested Cover block to achieve the desired effect.

To Reproduce
Steps to reproduce the behavior:

  1. In pattern editor, insert a Cover block and make it full aligned.
  2. Into the Cover block insert a new Cover block and try to make it full aligned. It is impossible as the option is missing.

(If it helps, you can see the issue in https://wordpress.org/patterns/pattern/14072/edit/ )

Expected behavior
I should be able to set full alignment for nested Cover block too.

Screenshots
Here is a little video of the issue:

chrome_kzaVEtn3Yc.mp4
@webmandesign
Copy link
Author

As can be seen in the video, the same actually applies for wide alignment.

@ryelle
Copy link
Contributor

ryelle commented Mar 23, 2022

I think this is a Gutenberg bug (either this one WordPress/gutenberg#37036 or this one WordPress/gutenberg#33374). Are you able to do this on a regular WP site with Gutenberg + a block-based theme?

@webmandesign
Copy link
Author

@ryelle You are right, the issue occurs once I swith the theme to Twenty Twenty-Two. (I'm also using Gutenberg 12.8.1 plugin in my localhost setup.)

But I'm a bit confused:

Checking out the code of a pattern preview on WPORG it seems you guys are using Twenty Twenty-One theme there. However, when I try to use the same setup in my localhost (with some additional styles I could get from the code inspector to match pattern preview widths and colors), I get different display of some patterns (such as #458).

Also, it seems that pattern editor is using Twenty Twenty-One theme too. But you say I should try to replicate this GitHub repo issue with a block theme. I tried to visit pattern library's Twenty Twenty-One's theme.json URL, but it throws me an error 404, so you guys don't seem to be using a block-based theme.(?) Do you use some modified Twenty Twenty-One theme there?

Why there is discrepancy in editor and pattern preview (aforementioned #458) if the theme seems to be the same?

Can you please provide info about how to set up my localhost "pattern draft" WordPress environment to match WPORG pattern preview and editor styles? Could this info be shared publicly?
You see, it's much better for me to play with patterns on localhost and once I'm satisfied with the result I can just copy the pattern to WPORG pattern editor (and tweak images there).

@ryelle
Copy link
Contributor

ryelle commented Mar 24, 2022

Do you use some modified Twenty Twenty-One theme there?

Yeah, the editor here, and the live preview, are set up using a "fake" block theme that uses the Twenty Twenty-One styles, but sets up a very basic block-based theme so that we can unlock all the editor functionality.

Can you please provide info about how to set up my localhost "pattern draft" WordPress environment to match WPORG pattern preview and editor styles? Could this info be shared publicly?

You can set up this project itself by following the readme, but you'll still need to use the same creator page locally. I would recommend using the Pattern Creator itself.

@webmandesign
Copy link
Author

That's unfortunate :)

Could you please also take a look what's going on with inconsistent widths as described in #458? It's confusing when WPORG pattern editor and preview don't match. Even users copying such pattern don't know what to expect when pasting it to their website - IF they copy it as it looks totally terrible in WPORG pattern preview.

@ryelle
Copy link
Contributor

ryelle commented Mar 24, 2022

Since this is confirmed to be the same gutenberg bug, I'm going to close the issue. Whenever Gutenberg fixes the problem, we'll inherit the fix.

I'll reply to #458 over on that issue.

@ryelle ryelle closed this as completed Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants