From 89765dd630352ba8e76f06fc50d471aa0f2c700e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Mon, 22 Nov 2021 12:30:37 +0100 Subject: [PATCH 1/2] Deprecate navigation areas --- packages/block-library/src/index.js | 2 +- packages/block-library/src/navigation-area/edit.js | 5 +++++ packages/block-library/src/navigation-area/index.php | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/index.js b/packages/block-library/src/index.js index 8a99d23811ac0..a2476fc0de97c 100644 --- a/packages/block-library/src/index.js +++ b/packages/block-library/src/index.js @@ -154,7 +154,6 @@ export const __experimentalGetCoreBlocks = () => [ missing, more, navigation, - navigationArea, navigationLink, navigationSubmenu, nextpage, @@ -253,6 +252,7 @@ export const __experimentalRegisterExperimentalCoreBlocks = commentReplyLink, commentTemplate, commentsQueryLoop, + navigationArea, postComment, postCommentsCount, postCommentsForm, diff --git a/packages/block-library/src/navigation-area/edit.js b/packages/block-library/src/navigation-area/edit.js index 97b65d2d1f8b2..a6bc398d27b6a 100644 --- a/packages/block-library/src/navigation-area/edit.js +++ b/packages/block-library/src/navigation-area/edit.js @@ -2,6 +2,7 @@ * WordPress dependencies */ import { __, _x } from '@wordpress/i18n'; +import deprecated from "@wordpress/deprecated"; import { store as coreStore } from '@wordpress/core-data'; import { MenuGroup, @@ -51,6 +52,10 @@ function NavigationAreaBlock( { attributes, setAttributes } ) { [ navigationAreas ] ); + deprecated( 'wp.blockLibrary.NavigationArea', { + since: '5.9', + } ); + return ( <> diff --git a/packages/block-library/src/navigation-area/index.php b/packages/block-library/src/navigation-area/index.php index e8fdc84bbef29..8c3e1b934400c 100644 --- a/packages/block-library/src/navigation-area/index.php +++ b/packages/block-library/src/navigation-area/index.php @@ -2,6 +2,7 @@ /** * Server-side rendering of the `core/navigation-area` block. * + * @deprecated 5.9.0 * @package WordPress */ From a13a2c43f88a09cda0c8727cc8c90f8e38cf7614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Mon, 22 Nov 2021 12:32:47 +0100 Subject: [PATCH 2/2] Document deprecation notice --- packages/block-library/src/navigation-area/edit.js | 2 +- packages/block-library/src/navigation-area/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/navigation-area/edit.js b/packages/block-library/src/navigation-area/edit.js index a6bc398d27b6a..4fd6d59b42780 100644 --- a/packages/block-library/src/navigation-area/edit.js +++ b/packages/block-library/src/navigation-area/edit.js @@ -2,7 +2,7 @@ * WordPress dependencies */ import { __, _x } from '@wordpress/i18n'; -import deprecated from "@wordpress/deprecated"; +import deprecated from '@wordpress/deprecated'; import { store as coreStore } from '@wordpress/core-data'; import { MenuGroup, diff --git a/packages/block-library/src/navigation-area/index.php b/packages/block-library/src/navigation-area/index.php index 8c3e1b934400c..65c64428d0c2e 100644 --- a/packages/block-library/src/navigation-area/index.php +++ b/packages/block-library/src/navigation-area/index.php @@ -2,7 +2,7 @@ /** * Server-side rendering of the `core/navigation-area` block. * - * @deprecated 5.9.0 + * @deprecated 5.9.0 See https://github.com/WordPress/gutenberg/issues/36524 * @package WordPress */