Skip to content

Commit

Permalink
Remove deferred spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasolson committed Aug 29, 2023
1 parent 3c99e94 commit 48341b4
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 63 deletions.
8 changes: 1 addition & 7 deletions packages/kbn-unified-doc-viewer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,4 @@
* Side Public License, v 1.
*/

export {
DeferredSpinner,
DocViewer,
DocViewsRegistry,
ElasticRequestState,
FieldName,
} from './src';
export { DocViewer, DocViewsRegistry, ElasticRequestState, FieldName } from './src';

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion packages/kbn-unified-doc-viewer/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
* Side Public License, v 1.
*/

export * from './deferred_spinner';
export * from './doc_viewer';
export * from './field_name';
13 changes: 5 additions & 8 deletions src/plugins/unified_doc_viewer/public/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import React from 'react';
import { withSuspense } from '@kbn/shared-ux-utility';
import { EuiDelayRender, EuiLoadingSpinner, EuiPanel } from '@elastic/eui';
import { EuiDelayRender, EuiSkeletonText } from '@elastic/eui';
import { DocViewRenderProps } from '@kbn/unified-doc-viewer/src/services/types';
import type { JsonCodeEditorProps } from './components';
import { UnifiedDocViewerPublicPlugin } from './plugin';

Expand All @@ -21,19 +22,15 @@ const LazyJsonCodeEditor = React.lazy(
export const JsonCodeEditor = withSuspense<JsonCodeEditorProps>(
LazyJsonCodeEditor,
<EuiDelayRender delay={300}>
<EuiPanel color="transparent" paddingSize="s">
<EuiLoadingSpinner size="m" />
</EuiPanel>
<EuiSkeletonText />
</EuiDelayRender>
);

const LazyUnifiedDocViewer = React.lazy(() => import('./components/doc_viewer'));
export const UnifiedDocViewer = withSuspense(
export const UnifiedDocViewer = withSuspense<DocViewRenderProps>(
LazyUnifiedDocViewer,
<EuiDelayRender delay={300}>
<EuiPanel color="transparent" paddingSize="s">
<EuiLoadingSpinner size="m" />
</EuiPanel>
<EuiSkeletonText />
</EuiDelayRender>
);

Expand Down
12 changes: 6 additions & 6 deletions src/plugins/unified_doc_viewer/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import React from 'react';
import type { CoreSetup, Plugin } from '@kbn/core/public';
import { DOC_TABLE_LEGACY } from '@kbn/discover-utils';
import { i18n } from '@kbn/i18n';
import { DeferredSpinner, DocViewsRegistry } from '@kbn/unified-doc-viewer';
import { EuiSkeletonText } from '@elastic/eui';
import { DocViewsRegistry } from '@kbn/unified-doc-viewer';
import { EuiDelayRender, EuiSkeletonText } from '@elastic/eui';
import { createGetterSetter, Storage } from '@kbn/kibana-utils-plugin/public';
import { DataPublicPluginStart } from '@kbn/data-plugin/public';
import { FieldFormatsStart } from '@kbn/field-formats-plugin/public';
Expand Down Expand Up @@ -57,9 +57,9 @@ export class UnifiedDocViewerPublicPlugin
return (
<React.Suspense
fallback={
<DeferredSpinner>
<EuiDelayRender delay={300}>
<EuiSkeletonText />
</DeferredSpinner>
</EuiDelayRender>
}
>
<DocView {...props} />
Expand All @@ -77,9 +77,9 @@ export class UnifiedDocViewerPublicPlugin
return (
<React.Suspense
fallback={
<DeferredSpinner>
<EuiDelayRender delay={300}>
<EuiSkeletonText />
</DeferredSpinner>
</EuiDelayRender>
}
>
<SourceViewer
Expand Down

0 comments on commit 48341b4

Please sign in to comment.