From 35c57a9c1898ab4726a1379f2c7e775577e219eb Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Tue, 1 Oct 2024 18:38:51 +0200 Subject: [PATCH 1/3] Navigator: mark experimental exports as deprecated --- packages/components/src/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts index 69e76b0b91f43f..39bb56096d6faf 100644 --- a/packages/components/src/index.ts +++ b/packages/components/src/index.ts @@ -129,15 +129,21 @@ export { default as __experimentalNavigationGroup } from './navigation/group'; export { default as __experimentalNavigationItem } from './navigation/item'; export { default as __experimentalNavigationMenu } from './navigation/menu'; export { + /** @deprecated Import `Navigator` instead. */ NavigatorProvider as __experimentalNavigatorProvider, + /** @deprecated Import `Navigator` instead. */ NavigatorScreen as __experimentalNavigatorScreen, + /** @deprecated Import `Navigator` instead. */ NavigatorButton as __experimentalNavigatorButton, + /** @deprecated Import `Navigator` instead. */ NavigatorBackButton as __experimentalNavigatorBackButton, + /** @deprecated Import `Navigator` instead. */ NavigatorToParentButton as __experimentalNavigatorToParentButton, } from './navigator/legacy'; export { Navigator, useNavigator, + /** @deprecated Import `Navigator` instead. */ useNavigator as __experimentalUseNavigator, } from './navigator'; export { default as Notice } from './notice'; From 27bee9cf0b7bf0f1aa3ada504f824de5ca4c744b Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Tue, 1 Oct 2024 18:44:19 +0200 Subject: [PATCH 2/3] CHANGELOG --- packages/components/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 4289866ce8b46f..2cb9849819bef4 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -13,6 +13,7 @@ - `__experimentalBorderControl` can now be imported as a stable `BorderControl` ([#65475](https://github.com/WordPress/gutenberg/pull/65475)). - `__experimentalBorderBoxControl` can now be imported as a stable `BorderBoxControl` ([#65586](https://github.com/WordPress/gutenberg/pull/65586)). +- `__experimentalNavigator*` components can now be imported as a stable `Navigator`. Similarly, the `__experimentalUseNavigator` hook can be imported as a stable `useNavigator` ([#65802](https://github.com/WordPress/gutenberg/pull/65802)). ### Enhancements From bd9ea197418d6d5e01853a4dbffa57060e0775d4 Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Wed, 2 Oct 2024 13:20:41 +0200 Subject: [PATCH 3/3] Update JSDocs deprecation alternatives suggestions --- packages/components/src/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts index 39bb56096d6faf..e82d6da70279e8 100644 --- a/packages/components/src/index.ts +++ b/packages/components/src/index.ts @@ -131,19 +131,19 @@ export { default as __experimentalNavigationMenu } from './navigation/menu'; export { /** @deprecated Import `Navigator` instead. */ NavigatorProvider as __experimentalNavigatorProvider, - /** @deprecated Import `Navigator` instead. */ + /** @deprecated Import `Navigator` and use `Navigator.Screen` instead. */ NavigatorScreen as __experimentalNavigatorScreen, - /** @deprecated Import `Navigator` instead. */ + /** @deprecated Import `Navigator` and use `Navigator.Button` instead. */ NavigatorButton as __experimentalNavigatorButton, - /** @deprecated Import `Navigator` instead. */ + /** @deprecated Import `Navigator` and use `Navigator.BackButton` instead. */ NavigatorBackButton as __experimentalNavigatorBackButton, - /** @deprecated Import `Navigator` instead. */ + /** @deprecated Import `Navigator` and use `Navigator.BackButton` instead. */ NavigatorToParentButton as __experimentalNavigatorToParentButton, } from './navigator/legacy'; export { Navigator, useNavigator, - /** @deprecated Import `Navigator` instead. */ + /** @deprecated Import `useNavigator` instead. */ useNavigator as __experimentalUseNavigator, } from './navigator'; export { default as Notice } from './notice';