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:
Evan Rusackas
2020-10-23 10:42:29 -07:00
committed by GitHub
parent ad88a06d61
commit efdda8b69e
13 changed files with 24 additions and 51 deletions

View File

@@ -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 => {

View File

@@ -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(),

View File

@@ -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

View File

@@ -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}

View File

@@ -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>

View File

@@ -558,7 +558,7 @@ class SqlEditor extends React.PureComponent {
</div>
<div className="rightItems">
<Button
className="autocomplete"
data-test="autocomplete"
buttonSize="small"
onClick={this.handleToggleAutocompleteEnabled}
>