-
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
Remove Text Columns block from insertion menus #8036
Conversation
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.
It works! 🐩
Should we remove the (beta) from Columns (beta)?
core-blocks/text-columns/index.js
Outdated
@@ -25,6 +26,9 @@ import './editor.scss'; | |||
export const name = 'core/text-columns'; | |||
|
|||
export const settings = { | |||
// Use an empty parent array to indicate this block should no longer be available for insertion. | |||
parent: [], |
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.
A more "official" way of doing this is to use supports.inserter: false
. Up to you which way you go—they should be functionally equivalent 🙂
gutenberg/core-blocks/block/index.js
Lines 23 to 27 in 7ab5a9e
supports: { | |
customClassName: false, | |
html: false, | |
inserter: false, | |
}, |
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.
Let's follow what we have for Shared 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.
That's much more explicit. I'll switch to that. Thanks for letting me know.
core-blocks/text-columns/index.js
Outdated
@@ -64,6 +68,12 @@ export const settings = { | |||
edit: ( ( { attributes, setAttributes, className } ) => { | |||
const { width, content, columns } = attributes; | |||
|
|||
deprecated( 'The Text Columns block', { | |||
version: 'a future version', |
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.
version
is an optional param, so we could just omit it entirely instead of being vague here.
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.
Oh—and we should update deprecated.md
.
@noisysocks I would wait until a basic solution for #6048 is implemented before removing the beta label from the Columns block. |
a4105ed
to
60674d8
Compare
Description
This is a simple PR to remove the Text Columns block from the block library and other insertion menus. It also prints a deprecation warning when loading a Text Columns block in the editor.
Closes #6506.
NOTE: It doesn't do everything called for in #6506 but follows Matías' direction on the issue and addresses the concern for the Try Gutenberg callout.
How has this been tested?
core/text-columns
block is not present in the block library or the block autocompletion menu.Checklist: