-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Post Content Block: Disable when editing content #24006
Changes from all commits
17b11b0
883524b
3581cf0
c2532e1
d5e6b14
43e4a90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,9 @@ export function initialize( id, settings ) { | |
|
||
registerCoreBlocks(); | ||
if ( process.env.GUTENBERG_PHASE === 2 ) { | ||
__experimentalRegisterExperimentalCoreBlocks( settings ); | ||
__experimentalRegisterExperimentalCoreBlocks( settings, { | ||
postType: 'wp_template', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like this could be a little confusing. Perhaps something like Or maybe just a comment here explaining why we are going with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah, it will be A few factors come into play here. One is that we're only setting
Yep, which brings us to the question whether However, it's arguable that a post object simply isn't the completely right fit anyway, and that we should replace it with something like
Agree, writing this reply I realized there's a lot of considerations that have gone into this. |
||
} ); | ||
} | ||
|
||
render( <Editor />, document.getElementById( id ) ); | ||
|
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.
should we exclude more site blocks, like postAuthor or postComments, etc?
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.
🤔 The main rationale for this PR was to prevent blockception (infinite recursion), which wouldn't happen with those blocks. But yeah, we might want to exclude the class of FSE relevant
post...
blocks from the content editor. They used to be kind of handy for testing, but maybe that's no longer needed now that we can do that in the Site Editor.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.
Please no, or at least not yet! 😄
The site editor is unreliable when it comes to loading post attributes into FSE blocks, while it's very easy to test post blocks in the post editor.
I agree that we should eventually limit FSE blocks to the Site Editor, but let's do it once we make it work appropriately.