From c48afd76b31a6fa645f11626abcce07d653dba86 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 7 Dec 2022 09:18:33 -0800 Subject: [PATCH 1/2] More clearly mark `EuiPageSideBarProps` as deprecated - it's causing confusion in Kibana --- src/components/page/index.ts | 2 +- src/components/page/page_side_bar/index.ts | 2 +- src/components/page/page_side_bar/page_side_bar.tsx | 7 +++++-- src/components/page/page_template.tsx | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/page/index.ts b/src/components/page/index.ts index 4b2042b1ae2..6326b61083b 100644 --- a/src/components/page/index.ts +++ b/src/components/page/index.ts @@ -39,7 +39,7 @@ export { export type { EuiPageSectionProps } from './page_section'; export { EuiPageSection } from './page_section'; -export type { EuiPageSideBarProps } from './page_side_bar'; +export type { EuiPageSideBarProps_Deprecated } from './page_side_bar'; export { EuiPageSideBar_Deprecated } from './page_side_bar'; export type { EuiPageSidebarProps } from './page_sidebar'; diff --git a/src/components/page/page_side_bar/index.ts b/src/components/page/page_side_bar/index.ts index 3aa64d3cd8c..4b8069aafb9 100644 --- a/src/components/page/page_side_bar/index.ts +++ b/src/components/page/page_side_bar/index.ts @@ -6,5 +6,5 @@ * Side Public License, v 1. */ -export type { EuiPageSideBarProps } from './page_side_bar'; +export type { EuiPageSideBarProps_Deprecated } from './page_side_bar'; export { EuiPageSideBar_Deprecated } from './page_side_bar'; diff --git a/src/components/page/page_side_bar/page_side_bar.tsx b/src/components/page/page_side_bar/page_side_bar.tsx index 41463ad3016..32b517d093e 100644 --- a/src/components/page/page_side_bar/page_side_bar.tsx +++ b/src/components/page/page_side_bar/page_side_bar.tsx @@ -19,7 +19,10 @@ const paddingSizeToClassNameMap = { export const PADDING_SIZES = keysOf(paddingSizeToClassNameMap); -export interface EuiPageSideBarProps +/** + * @deprecated Use the new EuiPageSidebarProps in page/page_sidebar instead + */ +export interface EuiPageSideBarProps_Deprecated extends CommonProps, HTMLAttributes { /** @@ -35,7 +38,7 @@ export interface EuiPageSideBarProps /** * @deprecated Use the new EuiPageSidebar in page/page_sidebar instead */ -export const EuiPageSideBar_Deprecated: FunctionComponent = ({ +export const EuiPageSideBar_Deprecated: FunctionComponent = ({ children, className, sticky, diff --git a/src/components/page/page_template.tsx b/src/components/page/page_template.tsx index 957a2a829e0..8a29e119b40 100644 --- a/src/components/page/page_template.tsx +++ b/src/components/page/page_template.tsx @@ -12,7 +12,7 @@ import { css } from '@emotion/react'; import { EuiPage, EuiPageProps } from './page'; import { EuiPageSideBar_Deprecated as EuiPageSideBar, - EuiPageSideBarProps, + EuiPageSideBarProps_Deprecated as EuiPageSideBarProps, } from './page_side_bar'; import { EuiPageBody, EuiPageBodyProps } from './page_body'; import { EuiPageHeader, EuiPageHeaderProps } from './page_header'; From e28ae6a08fb1542247177d926119ab682607d54c Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 7 Dec 2022 09:33:57 -0800 Subject: [PATCH 2/2] changelog --- upcoming_changelogs/6468.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 upcoming_changelogs/6468.md diff --git a/upcoming_changelogs/6468.md b/upcoming_changelogs/6468.md new file mode 100644 index 00000000000..effa200173b --- /dev/null +++ b/upcoming_changelogs/6468.md @@ -0,0 +1,3 @@ +**Deprecations** + +- Renamed `EuiPageSideBarProps` to `EuiPageSideBarProps_Deprecated`, to reduce usage/confusion with `EuiPageSidebar`