Wp-calypso: Missing Block Inserter in dotcom FSE w/ Gutenberg 8.4

Created on 30 Jun 2020  Â·  7Comments  Â·  Source: Automattic/wp-calypso

Dotcom FSE sites running on Gutenberg v 8.4 are missing their inserter:

Screen Shot 2020-06-29 at 7 41 23 PM

Expected (as seen on v8.3):

Screen Shot 2020-06-29 at 7 42 30 PM

This seems to be an issue with the Inserter implementation in post-content-block-appender:

https://github.com/Automattic/wp-calypso/blob/6a3f9e6170f0eb3a6c7f3ad8f9855dbb6e49ad1f/apps/full-site-editing/full-site-editing-plugin/dotcom-fse/editor/block-inserter/post-content-block-appender.js#L24-L29

Most helpful comment

The inserter is rendered and inserted fine. The issue is that something appears to cause the header to rerender. When the header rerenders, the element is gone — it's not part of the React tree.

This was a volatile solution to begin with and we're hitting an expected issue.

If you add a debugger statement after this line you can see the inserter is clearly inserted:
https://github.com/Automattic/wp-calypso/blob/4f23e86f849c96ea6567be6cac2ba1afa16a5d30/apps/full-site-editing/full-site-editing-plugin/dotcom-fse/editor/block-inserter/index.js#L35

All 7 comments

I checked 8.5.0-alpha.1 and 8.5.0 and couldn't reproduce this issue in neither.

Hrm, I am still noticing it on the 8.5.1 on edge stickered sites. Are you checking a dotcom FSE enabled site @alshakero (not just a dotcom site running the FSE plugin) ? Its the deprecated project that requires a specific blog sticker full-site-editing and supporting theme (such as Maywood) to be active.

Oh I didn't know this. That's probably why I didn't see it.

You can test "dotcom-FSE" by creating a site through this link: https://horizon.wordpress.com/start/test-fse, and then loading the page editor (not post editor)

It still has a few users on it, so it is still on the list to be checked to make sure it works. It's fragile, which is both why we are working core-first now, _and_ why we still have to check it 😅 But it will likely eventually be migrated to core FSE once we get there.

The top inserter is removed from the post (not _page_/FSE) editor as well, which is another issue and a quick fix. I'll have that in a PR soon.

The inserter is rendered and inserted fine. The issue is that something appears to cause the header to rerender. When the header rerenders, the element is gone — it's not part of the React tree.

This was a volatile solution to begin with and we're hitting an expected issue.

If you add a debugger statement after this line you can see the inserter is clearly inserted:
https://github.com/Automattic/wp-calypso/blob/4f23e86f849c96ea6567be6cac2ba1afa16a5d30/apps/full-site-editing/full-site-editing-plugin/dotcom-fse/editor/block-inserter/index.js#L35

Proposed fix/workaround for these issues: #44357

Was this page helpful?
0 / 5 - 0 ratings