feat(SqlLab): Change Save Dataset Button to Split Save Query Button IV (#20852)

* Moving entire split save btn PR

* Addressed review comments

* Remove arbitrary div from ErrorBoundary in Chart

* Added accidentally removed comment

* Fix act errors in SaveQuery tests

* Fix SaveDatasetActionButton test

* SaveDatasetModal test almost working

* SaveDatasetModal tests all passing

* Clean SaveDatasetModal test

* Fix create chart button and SaveDatasetModal text in SQL Lab

* Fix untitled dataset name on SaveDatasetModal in explore

* Fix styling on split save button
This commit is contained in:
Lyndsi Kay Williams
2022-08-01 14:36:34 -05:00
committed by GitHub
parent 3a11856ecb
commit 8a04536f9d
25 changed files with 515 additions and 196 deletions

View File

@@ -345,10 +345,10 @@ class SqlEditor extends React.PureComponent {
key: userOS === 'Windows' ? 'ctrl+q' : 'ctrl+t',
descr: t('New tab'),
func: () => {
const title = newQueryTabName(this.props.queryEditors || []);
const name = newQueryTabName(this.props.queryEditors || []);
this.props.addQueryEditor({
...this.props.queryEditor,
title,
name,
});
},
},
@@ -463,7 +463,7 @@ class SqlEditor extends React.PureComponent {
dbId: qe.dbId,
sql: qe.selectedText ? qe.selectedText : qe.sql,
sqlEditorId: qe.id,
tab: qe.title,
tab: qe.name,
schema: qe.schema,
tempTable: ctas ? this.state.ctas : '',
templateParams: qe.templateParams,
@@ -584,7 +584,7 @@ class SqlEditor extends React.PureComponent {
{scheduledQueriesConf && (
<Menu.Item>
<ScheduleQueryButton
defaultLabel={qe.title}
defaultLabel={qe.name}
sql={qe.sql}
onSchedule={this.props.actions.scheduleQuery}
schema={qe.schema}
@@ -722,10 +722,11 @@ class SqlEditor extends React.PureComponent {
<span>
<SaveQuery
query={qe}
defaultLabel={qe.title || qe.description}
defaultLabel={qe.name || qe.description}
onSave={this.saveQuery}
onUpdate={this.props.actions.updateSavedQuery}
saveQueryWarning={this.props.saveQueryWarning}
database={this.props.database}
/>
</span>
<span>