From 3fecc7f2898e29097ac087e0e23672d04ca73bc3 Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Mon, 2 Mar 2020 15:51:59 +0300 Subject: [PATCH 1/4] core_plugins/visualizations - migrate legacy CSS to new platform --- .../visualizations/public/np_ready/public/_index.scss | 2 -- .../public/np_ready/public/components/_index.scss | 2 +- .../public/np_ready/public/embeddable/_index.scss | 4 ++-- .../visualizations/public/np_ready/public/index.scss | 3 +++ .../visualizations/public/np_ready/public/index.ts | 2 ++ .../visualizations/public/np_ready/public/wizard/_index.scss | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) delete mode 100644 src/legacy/core_plugins/visualizations/public/np_ready/public/_index.scss create mode 100644 src/legacy/core_plugins/visualizations/public/np_ready/public/index.scss diff --git a/src/legacy/core_plugins/visualizations/public/np_ready/public/_index.scss b/src/legacy/core_plugins/visualizations/public/np_ready/public/_index.scss deleted file mode 100644 index eada763b63c4d..0000000000000 --- a/src/legacy/core_plugins/visualizations/public/np_ready/public/_index.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import 'wizard/index'; -@import 'embeddable/index'; diff --git a/src/legacy/core_plugins/visualizations/public/np_ready/public/components/_index.scss b/src/legacy/core_plugins/visualizations/public/np_ready/public/components/_index.scss index 532e8106b023f..99c357b53952f 100644 --- a/src/legacy/core_plugins/visualizations/public/np_ready/public/components/_index.scss +++ b/src/legacy/core_plugins/visualizations/public/np_ready/public/components/_index.scss @@ -1 +1 @@ -@import 'visualization'; +@import './visualization'; diff --git a/src/legacy/core_plugins/visualizations/public/np_ready/public/embeddable/_index.scss b/src/legacy/core_plugins/visualizations/public/np_ready/public/embeddable/_index.scss index c1e3809657bfa..6b31803e7c8c5 100644 --- a/src/legacy/core_plugins/visualizations/public/np_ready/public/embeddable/_index.scss +++ b/src/legacy/core_plugins/visualizations/public/np_ready/public/embeddable/_index.scss @@ -1,2 +1,2 @@ -@import 'visualize_lab_disabled'; -@import 'embeddables'; +@import './visualize_lab_disabled'; +@import './embeddables'; diff --git a/src/legacy/core_plugins/visualizations/public/np_ready/public/index.scss b/src/legacy/core_plugins/visualizations/public/np_ready/public/index.scss new file mode 100644 index 0000000000000..286749a69cd9c --- /dev/null +++ b/src/legacy/core_plugins/visualizations/public/np_ready/public/index.scss @@ -0,0 +1,3 @@ +@import './wizard/index'; +@import './embeddable/index'; +@import './components/index'; diff --git a/src/legacy/core_plugins/visualizations/public/np_ready/public/index.ts b/src/legacy/core_plugins/visualizations/public/np_ready/public/index.ts index b59eb2277411c..8d8cce6faa1f3 100644 --- a/src/legacy/core_plugins/visualizations/public/np_ready/public/index.ts +++ b/src/legacy/core_plugins/visualizations/public/np_ready/public/index.ts @@ -29,6 +29,8 @@ * either types, or static code. */ +import './index.scss'; + import { PublicContract } from '@kbn/utility-types'; import { PluginInitializerContext } from '../../../../../../core/public'; import { VisualizationsPlugin, VisualizationsSetup, VisualizationsStart } from './plugin'; diff --git a/src/legacy/core_plugins/visualizations/public/np_ready/public/wizard/_index.scss b/src/legacy/core_plugins/visualizations/public/np_ready/public/wizard/_index.scss index a10b4b1b347b7..328af16f3eebd 100644 --- a/src/legacy/core_plugins/visualizations/public/np_ready/public/wizard/_index.scss +++ b/src/legacy/core_plugins/visualizations/public/np_ready/public/wizard/_index.scss @@ -1 +1 @@ -@import 'dialog'; +@import './dialog'; From 1e97e67f1c5017efe50fc3804c18f5f76557761e Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Mon, 2 Mar 2020 18:08:30 +0300 Subject: [PATCH 2/4] Removed old references --- src/legacy/core_plugins/visualizations/index.ts | 3 --- src/legacy/core_plugins/visualizations/public/index.scss | 2 -- src/legacy/ui/public/_index.scss | 1 - src/legacy/ui/public/visualize/_index.scss | 1 - 4 files changed, 7 deletions(-) delete mode 100644 src/legacy/core_plugins/visualizations/public/index.scss delete mode 100644 src/legacy/ui/public/visualize/_index.scss diff --git a/src/legacy/core_plugins/visualizations/index.ts b/src/legacy/core_plugins/visualizations/index.ts index a2779cfe4346d..84d7569cdc9db 100644 --- a/src/legacy/core_plugins/visualizations/index.ts +++ b/src/legacy/core_plugins/visualizations/index.ts @@ -25,9 +25,6 @@ export const visualizations: LegacyPluginInitializer = kibana => id: 'visualizations', publicDir: resolve(__dirname, 'public'), require: [], - uiExports: { - styleSheetPaths: resolve(__dirname, 'public/index.scss'), - }, }); // eslint-disable-next-line import/no-default-export diff --git a/src/legacy/core_plugins/visualizations/public/index.scss b/src/legacy/core_plugins/visualizations/public/index.scss deleted file mode 100644 index 238f58fbfa295..0000000000000 --- a/src/legacy/core_plugins/visualizations/public/index.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import 'src/legacy/ui/public/styles/styling_constants'; -@import './np_ready/public/index'; diff --git a/src/legacy/ui/public/_index.scss b/src/legacy/ui/public/_index.scss index 3c3067776a161..6d807f815c5e2 100644 --- a/src/legacy/ui/public/_index.scss +++ b/src/legacy/ui/public/_index.scss @@ -23,4 +23,3 @@ // Can't import vis folder here because of cascading issues, it's imported in core_plugins/kibana // @import './vis/index'; -@import './visualize/index'; diff --git a/src/legacy/ui/public/visualize/_index.scss b/src/legacy/ui/public/visualize/_index.scss deleted file mode 100644 index c528c1e37b412..0000000000000 --- a/src/legacy/ui/public/visualize/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import '../../../core_plugins/visualizations/public/np_ready/public/components/index'; From 0e8167e1824094677c81a09994de5f26fe10b36b Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Tue, 3 Mar 2020 16:45:26 +0300 Subject: [PATCH 3/4] fixed imports for styles inside components --- .../visualizations/public/np_ready/public/index.scss | 1 - src/legacy/ui/public/_index.scss | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/legacy/core_plugins/visualizations/public/np_ready/public/index.scss b/src/legacy/core_plugins/visualizations/public/np_ready/public/index.scss index 286749a69cd9c..75826b1a26405 100644 --- a/src/legacy/core_plugins/visualizations/public/np_ready/public/index.scss +++ b/src/legacy/core_plugins/visualizations/public/np_ready/public/index.scss @@ -1,3 +1,2 @@ @import './wizard/index'; @import './embeddable/index'; -@import './components/index'; diff --git a/src/legacy/ui/public/_index.scss b/src/legacy/ui/public/_index.scss index 6d807f815c5e2..71f4d3a4ebbb0 100644 --- a/src/legacy/ui/public/_index.scss +++ b/src/legacy/ui/public/_index.scss @@ -23,3 +23,4 @@ // Can't import vis folder here because of cascading issues, it's imported in core_plugins/kibana // @import './vis/index'; +@import '../../core_plugins/visualizations/public/np_ready/public/components/index'; \ No newline at end of file From f3e317a6e2d2020a3cc3190c6496811793d9a31a Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Tue, 10 Mar 2020 19:20:26 +0300 Subject: [PATCH 4/4] Fixed imports --- src/legacy/core_plugins/visualizations/index.ts | 3 +++ .../visualizations/public/np_ready/public/index.scss | 4 ++++ .../visualizations/public/np_ready/public/index.ts | 2 -- .../visualizations/public/np_ready/public/plugin.ts | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/legacy/core_plugins/visualizations/index.ts b/src/legacy/core_plugins/visualizations/index.ts index 84d7569cdc9db..c5e093f89636b 100644 --- a/src/legacy/core_plugins/visualizations/index.ts +++ b/src/legacy/core_plugins/visualizations/index.ts @@ -25,6 +25,9 @@ export const visualizations: LegacyPluginInitializer = kibana => id: 'visualizations', publicDir: resolve(__dirname, 'public'), require: [], + uiExports: { + styleSheetPaths: resolve(__dirname, 'public/np_ready/public/index.scss'), + }, }); // eslint-disable-next-line import/no-default-export diff --git a/src/legacy/core_plugins/visualizations/public/np_ready/public/index.scss b/src/legacy/core_plugins/visualizations/public/np_ready/public/index.scss index 75826b1a26405..0dbb192dd81ac 100644 --- a/src/legacy/core_plugins/visualizations/public/np_ready/public/index.scss +++ b/src/legacy/core_plugins/visualizations/public/np_ready/public/index.scss @@ -1,2 +1,6 @@ +// Due the plugin is located on the old platform we should leave import of constants. +// It will be removed when "visualizations" will migrate to the new platform +@import 'src/legacy/ui/public/styles/styling_constants'; + @import './wizard/index'; @import './embeddable/index'; diff --git a/src/legacy/core_plugins/visualizations/public/np_ready/public/index.ts b/src/legacy/core_plugins/visualizations/public/np_ready/public/index.ts index 8d8cce6faa1f3..b59eb2277411c 100644 --- a/src/legacy/core_plugins/visualizations/public/np_ready/public/index.ts +++ b/src/legacy/core_plugins/visualizations/public/np_ready/public/index.ts @@ -29,8 +29,6 @@ * either types, or static code. */ -import './index.scss'; - import { PublicContract } from '@kbn/utility-types'; import { PluginInitializerContext } from '../../../../../../core/public'; import { VisualizationsPlugin, VisualizationsSetup, VisualizationsStart } from './plugin'; diff --git a/src/legacy/core_plugins/visualizations/public/np_ready/public/plugin.ts b/src/legacy/core_plugins/visualizations/public/np_ready/public/plugin.ts index b8db611f30815..5a8b44cd25fc1 100644 --- a/src/legacy/core_plugins/visualizations/public/np_ready/public/plugin.ts +++ b/src/legacy/core_plugins/visualizations/public/np_ready/public/plugin.ts @@ -58,6 +58,8 @@ import { UiActionsStart } from '../../../../../../plugins/ui_actions/public'; import { DataStart as LegacyDataStart } from '../../../../data/public'; import { VisState } from './types'; +import './index.scss'; + /** * Interface for this plugin's returned setup/start contracts. *