diff --git a/core-blocks/text-columns/index.js b/core-blocks/text-columns/index.js index 1d6940d8bf36fb..fc8245daa798e7 100644 --- a/core-blocks/text-columns/index.js +++ b/core-blocks/text-columns/index.js @@ -15,6 +15,7 @@ import { InspectorControls, RichText, } from '@wordpress/editor'; +import deprecated from '@wordpress/deprecated'; /** * Internal dependencies @@ -25,6 +26,11 @@ import './editor.scss'; export const name = 'core/text-columns'; export const settings = { + // Disable insertion as this block is deprecated and ultimately replaced by the Columns block. + supports: { + inserter: false, + }, + title: __( 'Text Columns' ), description: __( 'Add text, and display it in two or more columns. Like a newspaper! This block is experimental.' ), @@ -64,6 +70,11 @@ export const settings = { edit: ( ( { attributes, setAttributes, className } ) => { const { width, content, columns } = attributes; + deprecated( 'The Text Columns block', { + alternative: 'the Columns block', + plugin: 'Gutenberg', + } ); + return ( diff --git a/core-blocks/text-columns/test/index.js b/core-blocks/text-columns/test/index.js index 9c9dda8ee8ccea..61f0796e30ce8e 100644 --- a/core-blocks/text-columns/test/index.js +++ b/core-blocks/text-columns/test/index.js @@ -9,5 +9,8 @@ describe( 'core/text-columns', () => { const wrapper = blockEditRender( name, settings ); expect( wrapper ).toMatchSnapshot(); + expect( console ).toHaveWarnedWith( + 'The Text Columns block is deprecated and will be removed. Please use the Columns block instead.' + ); } ); } ); diff --git a/docs/reference/deprecated.md b/docs/reference/deprecated.md index 40147750761bd1..7a71022cc3f537 100644 --- a/docs/reference/deprecated.md +++ b/docs/reference/deprecated.md @@ -15,6 +15,7 @@ Gutenberg's deprecation policy is intended to support backwards-compatibility fo - All references to a block's `uid` have been replaced with equivalent props and selectors for `clientId`. - The `wp.editor.MediaPlaceholder` component `onSelectUrl` prop has been renamed to `onSelectURL`. - The `wp.editor.UrlInput` component has been renamed to `wp.editor.URLInput`. + - The Text Columns block has been removed. Please use the Columns block instead. ## 3.4.0