-
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
Disable "FSE" blocks in Widgets Editor #32761
Conversation
Can anyone help me to find all the entity based blocks? |
Size Change: +83 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
Now working on disabling in Customizer widgets. |
The "Site Logo" block doesn't work as well. Changes aren't saved from the widgets screens. |
I think reusable blocks would also need to be disabled (as they use entities), so I'm not sure how valid this option is. |
Yes, ➕ 1️⃣ for reusable block kind of making this option less viable. Nevertheless, we can come back later to all entity blocks. Disabling reusable blocks from widget areas now does not prevent them to be enabled later. |
@draganescu I've removed all the entity blocks including reusable blocks. I'll leave this PR here as an "option" if a better solution can't be found prior to 5.8. |
I don't think we can feasibly implement an entity saving flow in time for 5.8. I'm OK with adding support for these blocks in 5.8.x or 5.9. |
Does that mean we want to look to merge this? If so please could I have a review 🙏 🙇♂️ |
9daa3a1
to
73093e2
Compare
Tests failing...again. Unrelated. See #32887 |
73093e2
to
94fe64e
Compare
Rebased, let's see if the tests pass |
👀 Thanks for rebase @adamziel. I'll merge |
94fe64e
to
57492c2
Compare
Rebasin' again... |
Follow up Issue here |
* Disable post-* and query* blocks * Disable remaining entity blocks and any experimental FSE blocks * Apply same disabling in the Customizer Widgets screen * Remove any registered reusable blocks from inserter * Fully disable reusable blocks in Widgets Editor * Fully disable reusable blocks in Widgets Editor * Improve constant usage
* Disable post-* and query* blocks * Disable remaining entity blocks and any experimental FSE blocks * Apply same disabling in the Customizer Widgets screen * Remove any registered reusable blocks from inserter * Fully disable reusable blocks in Widgets Editor * Fully disable reusable blocks in Widgets Editor * Improve constant usage
const disabledBlocks = [ | ||
'core/more', | ||
'core/freeform', | ||
...( ! ALLOW_REUSABLE_BLOCKS && [ 'core/block' ] ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@getdave this does not work if we set ALLOW_REUSABLE_BLOCKS to true as the expression will return false
which is not iterable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good spot. Fix available for review #34634
Description
Currently FSE blocks don't play well with the Widgets Editor because the required entities aren't there. Moreover, we'd need to support the multi-saving flows/UI from the Site Editor in order to support these blocks.
For 5.8 we could consider disabling all "FSE" blocks. This PR does just that.
It doesn't mean we go with this approach, but this PR allows it to be an option.
Fixes #32756
How has this been tested?
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).