Skip to content

Commit 5ea747c

Browse files
authored
[Canvas] Update limits and change some imports (#182028)
updates the `limits.yml` to reflect that Canvas is actually _much_ smaller than it appears.
1 parent 4b4c573 commit 5ea747c

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

packages/kbn-optimizer/limits.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pageLoadAssetSize:
88
assetManager: 25000
99
banners: 17946
1010
bfetch: 22837
11-
canvas: 1066647
11+
canvas: 29355
1212
cases: 180037
1313
charts: 55000
1414
cloud: 21076
@@ -25,7 +25,7 @@ pageLoadAssetSize:
2525
core: 435325
2626
crossClusterReplication: 65408
2727
customIntegrations: 22034
28-
dashboard: 82025
28+
dashboard: 52967
2929
dashboardEnhanced: 65646
3030
data: 454087
3131
datasetQuality: 50624

x-pack/plugins/canvas/common/lib/constants.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
* 2.0.
66
*/
77

8-
// eslint-disable-next-line @kbn/imports/no_boundary_crossing
9-
import { SHAREABLE_RUNTIME_NAME } from '../../shareable_runtime/constants_static';
108
import { FilterField } from '../../types';
119

10+
// avoid import from shareable_runtime
11+
const SHAREABLE_RUNTIME_NAME = 'kbn_canvas';
12+
1213
export const CANVAS_TYPE = 'canvas-workpad';
1314
export const CUSTOM_ELEMENT_TYPE = 'canvas-element';
1415
export const TEMPLATE_TYPE = `${CANVAS_TYPE}-template`;

x-pack/plugins/canvas/public/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
* 2.0.
66
*/
77

8-
import { PluginInitializerContext } from '@kbn/core/public';
9-
import { CoreStart } from '@kbn/core/public';
10-
import { CanvasServices } from './services';
11-
import { CanvasSetup, CanvasStart, CanvasStartDeps, CanvasPlugin } from './plugin';
8+
import type { PluginInitializerContext } from '@kbn/core/public';
9+
import type { CoreStart } from '@kbn/core/public';
10+
import type { CanvasServices } from './services';
11+
import { type CanvasSetup, type CanvasStart, type CanvasStartDeps, CanvasPlugin } from './plugin';
1212

1313
export type { CanvasSetup, CanvasStart };
1414

x-pack/plugins/canvas/public/lib/loading_indicator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* 2.0.
66
*/
77

8-
import * as Rx from 'rxjs';
98
import { CoreStart } from '@kbn/core/public';
9+
import { BehaviorSubject } from 'rxjs';
1010

1111
let isActive = false;
1212

@@ -15,7 +15,7 @@ export interface LoadingIndicatorInterface {
1515
hide: () => void;
1616
}
1717

18-
const loadingCount$ = new Rx.BehaviorSubject(0);
18+
const loadingCount$ = new BehaviorSubject(0);
1919

2020
export const initLoadingIndicator = (addLoadingCount: CoreStart['http']['addLoadingCountSource']) =>
2121
addLoadingCount(loadingCount$);

0 commit comments

Comments
 (0)