Skip to content

Commit a916a08

Browse files
committed
Save visualization on save modal, VisBuilder for chart type
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
1 parent fca2f54 commit a916a08

File tree

7 files changed

+5
-44
lines changed

7 files changed

+5
-44
lines changed
Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
11
.osdSavedObjectSaveModal {
22
width: $euiSizeXXL * 10;
33
}
4-
5-
.osdSavedObjectSaveModalVisBuilder {
6-
color: $euiTextSubduedColor;
7-
font-size: $euiFontSizeM;
8-
}
9-
10-
.osdSavedObjectSaveModalBadge {
11-
margin-left: $euiSizeS;
12-
vertical-align: text-bottom;
13-
}

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

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ import {
4545
EuiSwitch,
4646
EuiSwitchEvent,
4747
EuiTextArea,
48-
EuiBadge,
49-
EuiBetaBadge,
5048
} from '@elastic/eui';
5149
import { FormattedMessage } from '@osd/i18n/react';
5250
import React from 'react';
@@ -72,7 +70,6 @@ interface Props {
7270
options?: React.ReactNode | ((state: SaveModalState) => React.ReactNode);
7371
description?: string;
7472
showDescription: boolean;
75-
isExperimental?: boolean;
7673
}
7774

7875
export interface SaveModalState {
@@ -114,7 +111,6 @@ export class SavedObjectSaveModal extends React.Component<Props, SaveModalState>
114111
defaultMessage="Save {objectType}"
115112
values={{ objectType: this.props.objectType }}
116113
/>
117-
{this.renderExperimentalBadge()}
118114
</EuiModalHeaderTitle>
119115
</EuiModalHeader>
120116

@@ -171,28 +167,6 @@ export class SavedObjectSaveModal extends React.Component<Props, SaveModalState>
171167
);
172168
}
173169

174-
private renderExperimentalBadge = () => {
175-
if (!this.props.isExperimental) {
176-
return;
177-
}
178-
179-
return (
180-
<EuiModalHeaderTitle className="osdSavedObjectSaveModalVisBuilder">
181-
<FormattedMessage
182-
id="savedObjects.saveModal.saveSubTitle"
183-
defaultMessage="Visualization Builder"
184-
/>
185-
<EuiBetaBadge
186-
label="Lab"
187-
iconType="beaker"
188-
color="subdued"
189-
size="s"
190-
className="osdSavedObjectSaveModalBadge"
191-
/>
192-
</EuiModalHeaderTitle>
193-
);
194-
};
195-
196170
private renderViewDescription = () => {
197171
if (!this.props.showDescription) {
198172
return;

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ interface OriginSaveModalProps {
5050
objectType: string;
5151
onClose: () => void;
5252
onSave: (props: OnSaveProps & { returnToOrigin: boolean }) => void;
53-
isExperimental?: boolean;
5453
}
5554

5655
export function SavedObjectSaveModalOrigin(props: OriginSaveModalProps) {
@@ -126,7 +125,6 @@ export function SavedObjectSaveModalOrigin(props: OriginSaveModalProps) {
126125
options={getReturnToOriginSwitch}
127126
description={documentInfo.description}
128127
showDescription={true}
129-
isExperimental={props.isExperimental}
130128
/>
131129
);
132130
}

src/plugins/vis_builder/common/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
export const PLUGIN_ID = 'wizard';
77
export const PLUGIN_NAME = 'Wizard';
88
export const VISUALIZE_ID = 'visualize';
9-
export const VIS_BUILDER_TYPE_SHORTHAND = 'VisBuilder';
109
export const EDIT_PATH = '/edit';
1110
export const VIS_BUILDER_STATE = 'experimental';
11+
export const VIS_BUILDER_CHART_TYPE = 'VisBuilder';
1212

1313
export {
1414
VisBuilderSavedObjectAttributes,

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

Lines changed: 1 addition & 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, VIS_BUILDER_STATE } from '../../../common';
42+
import { EDIT_PATH } from '../../../common';
4343
import { setEditorState } from './state_management/metadata_slice';
4444
export interface TopNavConfigParams {
4545
visualizationIdFromUrl: string;
@@ -99,7 +99,6 @@ export const getTopNavConfig = (
9999
onClose={() => {}}
100100
originatingApp={originatingApp}
101101
getAppNameFromId={stateTransfer.getAppNameFromId}
102-
isExperimental={VIS_BUILDER_STATE === 'experimental' ? true : false}
103102
/>
104103
);
105104

src/plugins/vis_builder/public/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {
2727
PLUGIN_ID,
2828
PLUGIN_NAME,
2929
VISBUILDER_SAVED_OBJECT,
30-
VIS_BUILDER_TYPE_SHORTHAND,
30+
VIS_BUILDER_CHART_TYPE,
3131
} from '../common';
3232
import { TypeService } from './services/type_service';
3333
import { getPreloadedStore } from './application/utils/state_management';
@@ -140,7 +140,7 @@ export class VisBuilderPlugin
140140
savedObjectType: VISBUILDER_SAVED_OBJECT,
141141
stage: 'experimental',
142142
title: attributes?.title,
143-
typeTitle: VIS_BUILDER_TYPE_SHORTHAND,
143+
typeTitle: VIS_BUILDER_CHART_TYPE,
144144
updated_at: updatedAt,
145145
}),
146146
},

test/functional/apps/visualize/_chart_types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
6565
'Timeline',
6666
'Vega',
6767
'Vertical Bar',
68-
'Visualization Builder',
68+
'Wizard', // TODO: Update to final name when ready
6969
];
7070
if (!isOss) {
7171
expectedChartTypes.push('Maps', 'Lens');

0 commit comments

Comments
 (0)