Skip to content

Commit 654f638

Browse files
committed
Rename wizard on save modal and visualization table
Change the wizard reference in save modal title, toggle and visualization table Signed-off-by: abbyhu2000 <[email protected]>
1 parent 74fd39f commit 654f638

File tree

5 files changed

+33
-10
lines changed

5 files changed

+33
-10
lines changed

src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import {
4545
EuiSwitch,
4646
EuiSwitchEvent,
4747
EuiTextArea,
48+
EuiBadge,
4849
} from '@elastic/eui';
4950
import { FormattedMessage } from '@osd/i18n/react';
5051
import React from 'react';
@@ -111,6 +112,11 @@ export class SavedObjectSaveModal extends React.Component<Props, SaveModalState>
111112
defaultMessage="Save {objectType}"
112113
values={{ objectType: this.props.objectType }}
113114
/>
115+
{this.props.objectType === 'Visualization (VisBuilder)' ? (
116+
<EuiBadge color="primary">{'Experimental'}</EuiBadge>
117+
) : (
118+
<></>
119+
)}
114120
</EuiModalHeaderTitle>
115121
</EuiModalHeader>
116122

@@ -323,11 +329,18 @@ export class SavedObjectSaveModal extends React.Component<Props, SaveModalState>
323329
checked={this.state.copyOnSave}
324330
onChange={this.onCopyOnSaveChange}
325331
label={
326-
<FormattedMessage
327-
id="savedObjects.saveModal.saveAsNewLabel"
328-
defaultMessage="Save as new {objectType}"
329-
values={{ objectType: this.props.objectType }}
330-
/>
332+
<div>
333+
<FormattedMessage
334+
id="savedObjects.saveModal.saveAsNewLabel"
335+
defaultMessage="Save as new {objectType}"
336+
values={{ objectType: this.props.objectType }}
337+
/>
338+
{this.props.objectType === 'Visualization (VisBuilder)' ? (
339+
<EuiBadge color="primary">{'Experimental'}</EuiBadge>
340+
) : (
341+
<></>
342+
)}
343+
</div>
331344
}
332345
/>
333346
<EuiSpacer />

src/plugins/vis_builder/common/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
export const PLUGIN_ID = 'wizard';
77
export const PLUGIN_NAME = 'Wizard';
8+
export const VIS_BUILDER_TYPE = 'Visualization (VisBuilder)';
89
export const VISUALIZE_ID = 'visualize';
910
export const EDIT_PATH = '/edit';
1011

src/plugins/vis_builder/public/application/utils/get_top_nav_config.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import {
3939
import { VisBuilderServices } from '../..';
4040
import { VisBuilderVisSavedObject } from '../../types';
4141
import { AppDispatch } from './state_management';
42-
import { EDIT_PATH } from '../../../common';
42+
import { EDIT_PATH, VIS_BUILDER_TYPE } from '../../../common';
4343
import { setEditorState } from './state_management/metadata_slice';
4444
export interface TopNavConfigParams {
4545
visualizationIdFromUrl: string;
@@ -95,7 +95,7 @@ export const getTopNavConfig = (
9595
dispatch,
9696
services
9797
)}
98-
objectType={'wizard'}
98+
objectType={VIS_BUILDER_TYPE}
9999
onClose={() => {}}
100100
originatingApp={originatingApp}
101101
getAppNameFromId={stateTransfer.getAppNameFromId}

src/plugins/vis_builder/public/plugin.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ import {
2222
import { VisBuilderEmbeddableFactoryDefinition, VISBUILDER_EMBEDDABLE } from './embeddable';
2323
import visBuilderIconSecondaryFill from './assets/wizard_icon_secondary_fill.svg';
2424
import visBuilderIcon from './assets/wizard_icon.svg';
25-
import { EDIT_PATH, PLUGIN_ID, PLUGIN_NAME, VISBUILDER_SAVED_OBJECT } from '../common';
25+
import {
26+
EDIT_PATH,
27+
PLUGIN_ID,
28+
PLUGIN_NAME,
29+
VISBUILDER_SAVED_OBJECT,
30+
VIS_BUILDER_TYPE,
31+
} from '../common';
2632
import { TypeService } from './services/type_service';
2733
import { getPreloadedStore } from './application/utils/state_management';
2834
import {
@@ -134,7 +140,7 @@ export class VisBuilderPlugin
134140
savedObjectType: VISBUILDER_SAVED_OBJECT,
135141
stage: 'experimental',
136142
title: attributes?.title,
137-
typeTitle: PLUGIN_NAME,
143+
typeTitle: VIS_BUILDER_TYPE,
138144
}),
139145
},
140146
},

src/plugins/visualize/public/application/utils/get_table_columns.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ const getBadge = (item: VisualizationListItem) => {
6060
return (
6161
<EuiBetaBadge
6262
className="visListingTable__experimentalIcon"
63-
label="E"
63+
label="Lab"
64+
size="s"
65+
color="subdued"
66+
iconType={'beaker'}
6467
title={i18n.translate('visualize.listing.experimentalTitle', {
6568
defaultMessage: 'Experimental',
6669
})}

0 commit comments

Comments
 (0)