Skip to content

Commit

Permalink
Revert "Upgrade EUI to v79.0.1 (elastic#156925)"
Browse files Browse the repository at this point in the history
This reverts commit b9ea4ce.
  • Loading branch information
dmlemeshko committed May 16, 2023
1 parent e68bb9b commit 10e974d
Show file tree
Hide file tree
Showing 122 changed files with 427 additions and 395 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.6.0-canary.3",
"@elastic/ems-client": "8.4.0",
"@elastic/eui": "79.0.1",
"@elastic/eui": "77.2.2",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",
Expand Down
12 changes: 3 additions & 9 deletions packages/kbn-cases-components/src/tooltip/skeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@
*/

import React from 'react';
import {
EuiFlexItem,
EuiSkeletonTitle,
EuiSkeletonText,
EuiHorizontalRule,
EuiSpacer,
} from '@elastic/eui';
import { EuiFlexItem, EuiLoadingContent, EuiHorizontalRule, EuiSpacer } from '@elastic/eui';

const SkeletonComponent: React.FC = () => {
return (
<EuiFlexItem css={{ width: 240 }} data-test-subj="tooltip-loading-content">
<EuiSkeletonTitle size="xxxs" css={{ width: 70, marginBottom: '12px' }} />
<EuiSkeletonText lines={3} />
<EuiLoadingContent lines={1} css={{ width: 70, marginBottom: '12px' }} />
<EuiLoadingContent lines={3} />
<EuiHorizontalRule margin="xs" />
<EuiSpacer size="s" />
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React, { useMemo } from 'react';
import type { FC } from 'react';
import { css } from '@emotion/react';
import {
EuiSkeletonText,
EuiLoadingContent,
EuiImage,
EuiEmptyPrompt,
EuiButton,
Expand Down Expand Up @@ -116,16 +116,13 @@ const EmptyViewerStateComponent: FC<EmptyViewerStateProps> = ({
listType,
]);

if (viewerStatus === ViewerStatus.LOADING || viewerStatus === ViewerStatus.SEARCHING)
return <EuiLoadingContent lines={4} data-test-subj="loadingViewerState" />;

return (
<EuiSkeletonText
lines={4}
data-test-subj="loadingViewerState"
isLoading={viewerStatus === ViewerStatus.LOADING || viewerStatus === ViewerStatus.SEARCHING}
>
<EuiPanel css={panelCss} color={viewerStatus === 'empty_search' ? 'subdued' : 'transparent'}>
<EuiEmptyPrompt {...euiEmptyPromptProps} />
</EuiPanel>
</EuiSkeletonText>
<EuiPanel css={panelCss} color={viewerStatus === 'empty_search' ? 'subdued' : 'transparent'}>
<EuiEmptyPrompt {...euiEmptyPromptProps} />
</EuiPanel>
);
};

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/dev/license_checker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ export const LICENSE_OVERRIDES = {
'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts
'@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint
'@elastic/ems-client@8.4.0': ['Elastic License 2.0'],
'@elastic/eui@79.0.1': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@77.2.2': ['SSPL-1.0 OR Elastic License 2.0'],
'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
*/

import React, { FunctionComponent } from 'react';
import { EuiSkeletonText, EuiPageContent_Deprecated as EuiPageContent } from '@elastic/eui';
import { EuiLoadingContent, EuiPageContent_Deprecated as EuiPageContent } from '@elastic/eui';

export const EditorContentSpinner: FunctionComponent = () => {
return (
<EuiPageContent className="conApp__editor__spinner">
<EuiSkeletonText lines={10} />
<EuiLoadingContent lines={10} />
</EuiPageContent>
);
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { EuiDelayRender, EuiSkeletonText } from '@elastic/eui';
import { EuiDelayRender, EuiLoadingContent } from '@elastic/eui';
import type { FieldFormat, FieldFormatParams } from '@kbn/field-formats-plugin/common';
import { memoize } from 'lodash';
import React, { LazyExoticComponent, PureComponent } from 'react';
Expand Down Expand Up @@ -62,10 +62,10 @@ export class FormatEditor extends PureComponent<FormatEditorProps, FormatEditorS
<React.Suspense
fallback={
// We specify minHeight to avoid too mitigate layout shifts while loading an editor
// ~430 corresponds to "4 lines" of EuiSkeletonText
// ~430 corresponds to "4 lines" of EuiLoadingContent
<div style={{ minHeight: 430, marginTop: 8 }}>
<EuiDelayRender>
<EuiSkeletonText lines={4} />
<EuiLoadingContent lines={4} />
</EuiDelayRender>
</div>
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { EuiDelayRender, EuiSkeletonText } from '@elastic/eui';
import { EuiDelayRender, EuiLoadingContent } from '@elastic/eui';
import type {
FieldFormatEditor as InnerFieldFormatEditor,
FieldFormatEditorFactory,
Expand Down Expand Up @@ -67,10 +67,10 @@ export class FieldFormatEditor extends PureComponent<
<React.Suspense
fallback={
// We specify minHeight to avoid too mitigate layout shifts while loading an editor
// ~430 corresponds to "4 lines" of EuiSkeletonText
// ~430 corresponds to "4 lines" of EuiLoadingContent
<div style={{ minHeight: 430, marginTop: 8 }}>
<EuiDelayRender>
<EuiSkeletonText lines={4} />
<EuiLoadingContent lines={4} />
</EuiDelayRender>
</div>
}
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/discover/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { SharePluginStart, SharePluginSetup } from '@kbn/share-plugin/public';
import { UrlForwardingSetup, UrlForwardingStart } from '@kbn/url-forwarding-plugin/public';
import { HomePublicPluginSetup } from '@kbn/home-plugin/public';
import { Start as InspectorPublicPluginStart } from '@kbn/inspector-plugin/public';
import { EuiSkeletonText } from '@elastic/eui';
import { EuiLoadingContent } from '@elastic/eui';
import { DataPublicPluginSetup, DataPublicPluginStart } from '@kbn/data-plugin/public';
import { SavedObjectsStart } from '@kbn/saved-objects-plugin/public';
import { DEFAULT_APP_CATEGORIES } from '@kbn/core/public';
Expand Down Expand Up @@ -248,7 +248,7 @@ export class DiscoverPlugin
<React.Suspense
fallback={
<DeferredSpinner>
<EuiSkeletonText />
<EuiLoadingContent />
</DeferredSpinner>
}
>
Expand All @@ -266,7 +266,7 @@ export class DiscoverPlugin
<React.Suspense
fallback={
<DeferredSpinner>
<EuiSkeletonText />
<EuiLoadingContent />
</DeferredSpinner>
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
*/

import React from 'react';
import { EuiSkeletonTextProps, EuiSkeletonText } from '@elastic/eui';
import { EuiLoadingContentProps, EuiLoadingContent } from '@elastic/eui';
import type { EuiCodeEditorProps } from './code_editor';

const Placeholder = ({ height }: { height?: string }) => {
const numericalHeight = height ? parseInt(height, 10) : 0;
// The height of one EuiSkeletonText line is 24px.
// The height of one EuiLoadingContent line is 24px.
const lineHeight = 24;
const calculatedLineCount =
numericalHeight < lineHeight ? 1 : Math.floor(numericalHeight / lineHeight);
const lines = Math.min(10, calculatedLineCount);

return <EuiSkeletonText lines={lines as EuiSkeletonTextProps['lines']} />;
return <EuiLoadingContent lines={lines as EuiLoadingContentProps['lines']} />;
};

const LazyEuiCodeEditor = React.lazy(() => import('./code_editor'));
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 10e974d

Please sign in to comment.