Skip to content

Commit

Permalink
[canvas] Reduce bundle size by combining SCSS imports (#102822)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
clintandrewhall and kibanamachine authored Jun 24, 2021
1 parent 803d0fa commit 2056845
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ const strings = {
}),
};

import './var_panel.scss';

interface Props {
selectedVar: CanvasVariable;
onDelete: (v: CanvasVariable) => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ const strings = {
}),
};

import './edit_var.scss';
import './var_panel.scss';

interface Props {
selectedVar: CanvasVariable | null;
variables: CanvasVariable[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import { CanvasVariable } from '../../../types';
import { EditVar } from './edit_var';
import { DeleteVar } from './delete_var';

import './var_config.scss';

enum PanelMode {
List,
Edit,
Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugins/canvas/public/style/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@
@import '../components/workpad_page/workpad_page';
@import '../components/workpad_page/workpad_interactive_page/workpad_interactive_page';
@import '../components/workpad_page/workpad_static_page/workpad_static_page';
@import '../components/var_config/edit_var';
@import '../components/var_config/var_config';

@import '../transitions/fade/fade';
@import '../transitions/rotate/rotate';
@import '../transitions/slide/slide';
@import '../transitions/zoom/zoom';

@import '../../canvas_plugin_src/renderers/filters/advanced_filter/component/advanced_filter.scss';
@import '../../canvas_plugin_src/renderers/filters/dropdown_filter/component/dropdown_filter.scss';
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/canvas/public/transitions/fade/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* 2.0.
*/

import './fade.scss';

import { TransitionStrings } from '../../../i18n';

const { fade: strings } = TransitionStrings;
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/canvas/public/transitions/rotate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* 2.0.
*/

import './rotate.scss';

import { TransitionStrings } from '../../../i18n';

const { rotate: strings } = TransitionStrings;
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/canvas/public/transitions/slide/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* 2.0.
*/

import './slide.scss';

import { TransitionStrings } from '../../../i18n';

const { slide: strings } = TransitionStrings;
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/canvas/public/transitions/zoom/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* 2.0.
*/

import './zoom.scss';

import { TransitionStrings } from '../../../i18n';

const { zoom: strings } = TransitionStrings;
Expand Down

0 comments on commit 2056845

Please sign in to comment.