mirror of
https://github.com/apache/superset.git
synced 2026-04-26 11:34:27 +00:00
chore: Button cruft cleanup (#11342)
* toggleSchedule * cleaning up run query button * removing unnecessary (subtle!) style overrides * bulk action classname to button style prop * nixing btn-primary * nixing cancelQuery class * togglesave * nixing autocomplete class * linting * nixing button classes of 'ok' and 'reset' * unoing diagnostic test * begrudgingly adding an m-r-3 class... for now * this is not a class to worry about * test fixes for limit control * updating TODO notes, calling it a day for now. * gah... copy paste error.
This commit is contained in:
@@ -75,7 +75,7 @@ class ExploreResultsButton extends React.PureComponent {
|
||||
this.dialog.show({
|
||||
title: t('Explore'),
|
||||
body: msg,
|
||||
actions: [Dialog.DefaultAction('Ok', () => {}, 'btn-primary')],
|
||||
actions: [Dialog.DefaultAction('Ok', () => {})],
|
||||
bsSize: 'large',
|
||||
bsStyle: 'warning',
|
||||
onHide: dialog => {
|
||||
|
||||
@@ -118,7 +118,8 @@ export default class LimitControl extends React.PureComponent<
|
||||
<Button
|
||||
buttonSize="small"
|
||||
buttonStyle="primary"
|
||||
className="float-right ok"
|
||||
className="float-right"
|
||||
data-test="limit-control-confirm"
|
||||
disabled={!isValid}
|
||||
onClick={this.submitAndClose}
|
||||
>
|
||||
@@ -126,7 +127,8 @@ export default class LimitControl extends React.PureComponent<
|
||||
</Button>
|
||||
<Button
|
||||
buttonSize="small"
|
||||
className="float-right reset"
|
||||
className="float-right m-r-3"
|
||||
data-test="limit-control-cancel"
|
||||
onClick={this.setValueAndClose.bind(
|
||||
this,
|
||||
this.props.defaultQueryLimit.toString(),
|
||||
|
||||
@@ -184,7 +184,7 @@ export default function SaveQuery({
|
||||
>
|
||||
{isSaved ? t('Save New') : t('Save')}
|
||||
</Button>
|
||||
<Button onClick={close} className="cancelQuery" cta>
|
||||
<Button onClick={close} data-test="cancel-query" cta>
|
||||
{t('Cancel')}
|
||||
</Button>
|
||||
</Col>
|
||||
@@ -195,7 +195,7 @@ export default function SaveQuery({
|
||||
|
||||
return (
|
||||
<span className="SaveQuery">
|
||||
<Button buttonSize="small" className="toggleSave" onClick={toggleSave}>
|
||||
<Button buttonSize="small" onClick={toggleSave}>
|
||||
<i className="fa fa-save" /> {t('Save')}
|
||||
</Button>
|
||||
<Modal
|
||||
|
||||
@@ -200,7 +200,6 @@ class ScheduleQueryButton extends React.PureComponent {
|
||||
triggerNode={
|
||||
<Button
|
||||
buttonSize="small"
|
||||
className="toggleSchedule"
|
||||
onClick={this.toggleSchedule}
|
||||
disabled={this.props.disabled}
|
||||
tooltip={this.props.tooltip}
|
||||
|
||||
@@ -108,7 +108,7 @@ class ShareSqlLabQuery extends React.Component {
|
||||
onClick={this.getCopyUrl}
|
||||
content={this.renderPopover()}
|
||||
>
|
||||
<Button buttonSize="small" className="toggleSave">
|
||||
<Button buttonSize="small">
|
||||
<i className="fa fa-share" /> {t('Share')}
|
||||
</Button>
|
||||
</Popover>
|
||||
|
||||
@@ -558,7 +558,7 @@ class SqlEditor extends React.PureComponent {
|
||||
</div>
|
||||
<div className="rightItems">
|
||||
<Button
|
||||
className="autocomplete"
|
||||
data-test="autocomplete"
|
||||
buttonSize="small"
|
||||
onClick={this.handleToggleAutocompleteEnabled}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user