From a60c5dced141ad184015af46e2a5285a4f47e9c7 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Thu, 4 May 2023 14:56:54 -0700 Subject: [PATCH 1/2] Fully remove `EuiLoadingContent` --- .../src/views/loading/loading_example.tsx | 17 ------------- .../loading_content.test.tsx.snap | 25 ------------------- src/components/loading/index.ts | 2 -- .../loading/loading_content.test.tsx | 21 ---------------- src/components/loading/loading_content.tsx | 23 ----------------- 5 files changed, 88 deletions(-) delete mode 100644 src/components/loading/__snapshots__/loading_content.test.tsx.snap delete mode 100644 src/components/loading/loading_content.test.tsx delete mode 100644 src/components/loading/loading_content.tsx diff --git a/src-docs/src/views/loading/loading_example.tsx b/src-docs/src/views/loading/loading_example.tsx index ba7cb87ce94..75d9c14ee53 100644 --- a/src-docs/src/views/loading/loading_example.tsx +++ b/src-docs/src/views/loading/loading_example.tsx @@ -9,7 +9,6 @@ import { EuiLoadingElastic, EuiLoadingSpinner, EuiLoadingChart, - EuiCallOut, } from '../../../../src/components'; import { @@ -137,21 +136,5 @@ export const LoadingExample = { snippet: '', playground: loadingSpinnerConfig, }, - { - title: 'Text content', - text: ( - -

- EuiLoadingContent has been deprecated in favor of{' '} - EuiSkeletonText. Head on over to the{' '} - Skeleton documentation page to - see more loading skeleton usages. -

-
- ), - }, ], }; diff --git a/src/components/loading/__snapshots__/loading_content.test.tsx.snap b/src/components/loading/__snapshots__/loading_content.test.tsx.snap deleted file mode 100644 index 68040ef9d2a..00000000000 --- a/src/components/loading/__snapshots__/loading_content.test.tsx.snap +++ /dev/null @@ -1,25 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`EuiLoadingContent is rendered 1`] = ` -
- - - - - -
-`; diff --git a/src/components/loading/index.ts b/src/components/loading/index.ts index 459707fbd76..7c0aaa51590 100644 --- a/src/components/loading/index.ts +++ b/src/components/loading/index.ts @@ -10,8 +10,6 @@ export type { EuiLoadingElasticProps } from './loading_elastic'; export { EuiLoadingElastic } from './loading_elastic'; export type { EuiLoadingChartProps } from './loading_chart'; export { EuiLoadingChart } from './loading_chart'; -export type { EuiLoadingContentProps } from './loading_content'; -export { EuiLoadingContent } from './loading_content'; export type { EuiLoadingSpinnerProps } from './loading_spinner'; export { EuiLoadingSpinner } from './loading_spinner'; export type { EuiLoadingLogoProps } from './loading_logo'; diff --git a/src/components/loading/loading_content.test.tsx b/src/components/loading/loading_content.test.tsx deleted file mode 100644 index 927bdab91fc..00000000000 --- a/src/components/loading/loading_content.test.tsx +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React from 'react'; -import { render } from 'enzyme'; -import { requiredProps } from '../../test/required_props'; - -import { EuiLoadingContent } from './loading_content'; - -describe('EuiLoadingContent', () => { - test('is rendered', () => { - const component = render(); - - expect(component).toMatchSnapshot(); - }); -}); diff --git a/src/components/loading/loading_content.tsx b/src/components/loading/loading_content.tsx deleted file mode 100644 index 1734899164c..00000000000 --- a/src/components/loading/loading_content.tsx +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React, { FunctionComponent } from 'react'; - -import { EuiSkeletonText, EuiSkeletonTextProps } from '../skeleton'; - -/** - * @deprecated Use `EuiSkeletonTextProps` instead - */ -export type EuiLoadingContentProps = EuiSkeletonTextProps; - -/** - * @deprecated Use `EuiSkeletonText` instead - */ -export const EuiLoadingContent: FunctionComponent = ( - props -) => ; From 8d8f13b7368a1659e37632729998b2fa6ccae299 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Thu, 4 May 2023 15:03:10 -0700 Subject: [PATCH 2/2] changelog --- upcoming_changelogs/6754.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 upcoming_changelogs/6754.md diff --git a/upcoming_changelogs/6754.md b/upcoming_changelogs/6754.md new file mode 100644 index 00000000000..720fcbd270c --- /dev/null +++ b/upcoming_changelogs/6754.md @@ -0,0 +1,3 @@ +**Breaking changes** + +- Removed deprecated `EuiLoadingContent`. Use the `EuiSkeleton` components instead.