-
Notifications
You must be signed in to change notification settings - Fork 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
Gutenberg 8.0.0 legacy FSE compatibility: add block patterns to inserter #41654
Comments
It looks like this may be a result of |
The FSE plugin uses That means that with Gutenberg 8 installed, we're should be using Gutenberg 8's included block-editor package. |
This is expected behavior. wp-calypso/apps/full-site-editing/full-site-editing-plugin/dotcom-fse/class-full-site-editing.php Line 432 in 4537033
Then we build and inject our own inerter/appender: Lines 24 to 29 in 4537033
I've been digging a bit and the best path forward here is unclear to me. Ideally, we could simply set a different It's unappealing to reimplement the entire block inserter for a feature that is deprecated. |
100% agreed. Fixing current functionality that gets broken is one thing, but ensuring it inherits new functionality is another. I think we should move this to the prioritized backlog and not have it as a blocker for 8.0 release. |
The contents of the new inserter are exposed as experimental:
Used here in the new layout: https://github.com/WordPress/gutenberg/blob/4830c2c2b95dc612b73efffbd3ed03cd93cd83fa/packages/edit-post/src/components/layout/index.js#L185-L192 Here's the component: https://github.com/WordPress/gutenberg/blob/4830c2c2b95dc612b73efffbd3ed03cd93cd83fa/packages/block-editor/src/components/inserter/library.js |
I had a quick look into this. The visibility of the |
Semi-related: The design of the inserter menu has changed slightly. See: WordPress/gutenberg#19279 |
This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels. |
Reported by @p-jackson:
In testing Gutenberg v8.0.0 on legacy wpcom FSE sites, the main block inserter does not include a tab for block patterns. However, in v8.0.0, the block patterns were moved from a plugin in the sidebar, to a tab in the main block inserter. From a little digging, it looks like the FSE plugin rebuilds the block inserter to replace the default one so that it can set a
rootClientId
. It sounds like this was so that an inserted block would be inserted into the correct part of the page / template (e.g. inserting into the header or template part, versus inserting into the post content).Here's the relevant component:
https://github.com/automattic/wp-calypso/blob/4537033c6794449ce0a10b69d72daf5fa658d553/apps/full-site-editing/full-site-editing-plugin/dotcom-fse/editor/block-inserter/post-content-block-appender.js#L24
Screenshot of FSE block inserter
Screenshot of what the inserter "should" look like
Note that the new block inserter is also a panel instead of a pop-over, and left aligned to the edge of the window.
Things to look into in addressing this:
@wordpress/
packages in the FSE plugin?The text was updated successfully, but these errors were encountered: