-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Editor inline styles generated by block supports are broken in Query Loop block preview #54956
Comments
Hmm this is an interesting one. The |
Looks like this regression was introduced in #52888 and it's happening with any block supports requiring extra styles to be output; setting duotone on featured images has the same effect: It's funny because |
Hrm, this is possibly clutching at straws, but the previews use their own gutenberg/packages/block-editor/src/components/block-preview/index.js Lines 126 to 133 in 205f1e3
They receive the value for settings from the wrapping |
I'm not familiar at all with It's worth noting that the overrides are not saved in the settings, but rather separately in the block editor store. These overrides are then consumed by the Does |
Yes, it's used to ensure previewed block markup is rendered in situ, but is neither interactive, nor in a separate iframe preview. It looks like it's used by both the Post Template and the Comment Template blocks. From a little digging it looks like Curiously, however, if I create a synced pattern that contains elements and Duotone styles, they're all rendered correctly in other instances of Here's a quick screenshot of the BlockPreview for a pattern containing Duotone and Elements styles (just proves that |
I have an idea for how to propagate the styles up from within the |
I can confirm that the issue is resolved in WordPress 6.4 RC1 🎉 Thank you to everyone who helped resolve this in time before the release 💙 |
Description
When using a Query Loop to display content, all but the currently selected items in the query get rendered using the
__experimentalUseBlockPreview
hook.In WordPress 6.4 Beta 1 this block preview does not get any of the blocks generated inline styles from the style engine applied causing broken layouts in the editor.
The items rendered by the
useBlockPreview
hook are missing the generated classnameswp-container-278
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
CleanShot.2023-10-01.at.17.19.18.mp4
Environment info
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
The text was updated successfully, but these errors were encountered: