From 81f5950ad8c086068ae47aaba9278d17e0836bb3 Mon Sep 17 00:00:00 2001 From: "Qingyang(Abby) Hu" Date: Thu, 27 Oct 2022 10:54:17 -0700 Subject: [PATCH] [Vis Builder] Rename wizard on save modal and visualization table (#2645) * Rename wizard on save modal and visualization table Change the wizard reference in save modal title, toggle and visualization table Signed-off-by: abbyhu2000 * Save visualization on save modal, VisBuilder for chart type Signed-off-by: abbyhu2000 * No experimental flag Signed-off-by: abbyhu2000 Signed-off-by: abbyhu2000 --- src/plugins/vis_builder/common/index.ts | 1 + .../public/application/utils/get_top_nav_config.tsx | 2 +- src/plugins/vis_builder/public/plugin.ts | 10 ++++++++-- .../application/components/visualize_listing.scss | 2 +- .../public/application/utils/get_table_columns.tsx | 5 ++++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/plugins/vis_builder/common/index.ts b/src/plugins/vis_builder/common/index.ts index 7561c96c36d6..d28c9b8fa58c 100644 --- a/src/plugins/vis_builder/common/index.ts +++ b/src/plugins/vis_builder/common/index.ts @@ -7,6 +7,7 @@ export const PLUGIN_ID = 'wizard'; export const PLUGIN_NAME = 'Wizard'; export const VISUALIZE_ID = 'visualize'; export const EDIT_PATH = '/edit'; +export const VIS_BUILDER_CHART_TYPE = 'VisBuilder'; export { VisBuilderSavedObjectAttributes, diff --git a/src/plugins/vis_builder/public/application/utils/get_top_nav_config.tsx b/src/plugins/vis_builder/public/application/utils/get_top_nav_config.tsx index 8867721d1184..38b6f51e2f4f 100644 --- a/src/plugins/vis_builder/public/application/utils/get_top_nav_config.tsx +++ b/src/plugins/vis_builder/public/application/utils/get_top_nav_config.tsx @@ -95,7 +95,7 @@ export const getTopNavConfig = ( dispatch, services )} - objectType={'wizard'} + objectType={'visualization'} onClose={() => {}} originatingApp={originatingApp} getAppNameFromId={stateTransfer.getAppNameFromId} diff --git a/src/plugins/vis_builder/public/plugin.ts b/src/plugins/vis_builder/public/plugin.ts index 56006fcbd971..11c5ec1a8e12 100644 --- a/src/plugins/vis_builder/public/plugin.ts +++ b/src/plugins/vis_builder/public/plugin.ts @@ -22,7 +22,13 @@ import { import { VisBuilderEmbeddableFactoryDefinition, VISBUILDER_EMBEDDABLE } from './embeddable'; import visBuilderIconSecondaryFill from './assets/wizard_icon_secondary_fill.svg'; import visBuilderIcon from './assets/wizard_icon.svg'; -import { EDIT_PATH, PLUGIN_ID, PLUGIN_NAME, VISBUILDER_SAVED_OBJECT } from '../common'; +import { + EDIT_PATH, + PLUGIN_ID, + PLUGIN_NAME, + VISBUILDER_SAVED_OBJECT, + VIS_BUILDER_CHART_TYPE, +} from '../common'; import { TypeService } from './services/type_service'; import { getPreloadedStore } from './application/utils/state_management'; import { @@ -134,7 +140,7 @@ export class VisBuilderPlugin savedObjectType: VISBUILDER_SAVED_OBJECT, stage: 'experimental', title: attributes?.title, - typeTitle: PLUGIN_NAME, + typeTitle: VIS_BUILDER_CHART_TYPE, updated_at: updatedAt, }), }, diff --git a/src/plugins/visualize/public/application/components/visualize_listing.scss b/src/plugins/visualize/public/application/components/visualize_listing.scss index 13c2be619247..3cb24d7940ba 100644 --- a/src/plugins/visualize/public/application/components/visualize_listing.scss +++ b/src/plugins/visualize/public/application/components/visualize_listing.scss @@ -11,7 +11,7 @@ .visListingTable__experimentalIcon { width: $euiSizeL; - vertical-align: baseline; + vertical-align: middle; padding: 0 $euiSizeS; margin-left: $euiSizeS; } diff --git a/src/plugins/visualize/public/application/utils/get_table_columns.tsx b/src/plugins/visualize/public/application/utils/get_table_columns.tsx index 33c847dbd833..02917cf2b903 100644 --- a/src/plugins/visualize/public/application/utils/get_table_columns.tsx +++ b/src/plugins/visualize/public/application/utils/get_table_columns.tsx @@ -60,7 +60,10 @@ const getBadge = (item: VisualizationListItem) => { return (