From b750c2be81807c9a4d0899e4c2630797c67122b9 Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Sat, 17 Feb 2024 19:39:19 +0900 Subject: [PATCH 1/4] Navigation: Soft deprecate component --- packages/components/src/navigation/README.md | 4 ++++ packages/components/src/navigation/back-button/index.tsx | 3 +++ packages/components/src/navigation/group/index.tsx | 3 +++ packages/components/src/navigation/index.tsx | 2 ++ packages/components/src/navigation/item/index.tsx | 3 +++ packages/components/src/navigation/menu/index.tsx | 3 +++ packages/components/src/navigation/stories/index.story.tsx | 3 ++- 7 files changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/components/src/navigation/README.md b/packages/components/src/navigation/README.md index 3a1fa992611b62..b294eb78331eef 100644 --- a/packages/components/src/navigation/README.md +++ b/packages/components/src/navigation/README.md @@ -1,5 +1,9 @@ # Navigation +
+This component is deprecated. Consider using `Navigator` instead. +
+
This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
diff --git a/packages/components/src/navigation/back-button/index.tsx b/packages/components/src/navigation/back-button/index.tsx index 182faa8773726d..f1fb79ae40d484 100644 --- a/packages/components/src/navigation/back-button/index.tsx +++ b/packages/components/src/navigation/back-button/index.tsx @@ -64,6 +64,9 @@ function UnforwardedNavigationBackButton( ); } +/** + * @deprecated Use `Navigator` instead. + */ export const NavigationBackButton = forwardRef( UnforwardedNavigationBackButton ); diff --git a/packages/components/src/navigation/group/index.tsx b/packages/components/src/navigation/group/index.tsx index cd91fb97365d26..60febcf7644569 100644 --- a/packages/components/src/navigation/group/index.tsx +++ b/packages/components/src/navigation/group/index.tsx @@ -19,6 +19,9 @@ import type { NavigationGroupProps } from '../types'; let uniqueId = 0; +/** + * @deprecated Use `Navigator` instead. + */ export function NavigationGroup( { children, className, diff --git a/packages/components/src/navigation/index.tsx b/packages/components/src/navigation/index.tsx index dfc1b26cb33ad0..9ccd4f46e5f182 100644 --- a/packages/components/src/navigation/index.tsx +++ b/packages/components/src/navigation/index.tsx @@ -28,6 +28,8 @@ const noop = () => {}; /** * Render a navigation list with optional groupings and hierarchy. * + * @deprecated Use `Navigator` instead. + * * ```jsx * import { * __experimentalNavigation as Navigation, diff --git a/packages/components/src/navigation/item/index.tsx b/packages/components/src/navigation/item/index.tsx index 2fd1aebefcbbac..d234ed1a549b59 100644 --- a/packages/components/src/navigation/item/index.tsx +++ b/packages/components/src/navigation/item/index.tsx @@ -22,6 +22,9 @@ import type { NavigationItemProps } from '../types'; const noop = () => {}; +/** + * @deprecated Use `Navigator` instead. + */ export function NavigationItem( props: NavigationItemProps ) { const { badge, diff --git a/packages/components/src/navigation/menu/index.tsx b/packages/components/src/navigation/menu/index.tsx index b001bd0fa0f3d8..8fcddf3faddb9e 100644 --- a/packages/components/src/navigation/menu/index.tsx +++ b/packages/components/src/navigation/menu/index.tsx @@ -23,6 +23,9 @@ import { MenuUI } from '../styles/navigation-styles'; import type { NavigationMenuProps } from '../types'; +/** + * @deprecated Use `Navigator` instead. + */ export function NavigationMenu( props: NavigationMenuProps ) { const { backButtonLabel, diff --git a/packages/components/src/navigation/stories/index.story.tsx b/packages/components/src/navigation/stories/index.story.tsx index e0a3f1e1397576..bf8f77b6d130cb 100644 --- a/packages/components/src/navigation/stories/index.story.tsx +++ b/packages/components/src/navigation/stories/index.story.tsx @@ -20,7 +20,8 @@ import { HideIfEmptyStory } from './utils/hide-if-empty'; import './style.css'; const meta: Meta< typeof Navigation > = { - title: 'Components (Experimental)/Navigation', + title: 'Components (Deprecated)/Navigation', + id: 'components-navigation', component: Navigation, subcomponents: { // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170 From 8bd7063041483e499a7c5b6c6e21c3c2e915523d Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Fri, 12 Apr 2024 22:44:53 +0900 Subject: [PATCH 2/4] Set up redirect --- storybook/manager-head.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/storybook/manager-head.html b/storybook/manager-head.html index 21ee902c02a36d..629f06bf98edf9 100644 --- a/storybook/manager-head.html +++ b/storybook/manager-head.html @@ -1,10 +1,19 @@