-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Boostrap to AntD - Row/Col #14100
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,8 @@ | |
*/ | ||
import React, { FunctionComponent, useState } from 'react'; | ||
import Form, { FormProps, FormValidation } from 'react-jsonschema-form'; | ||
import { Col, FormControl, FormGroup, Row } from 'react-bootstrap'; | ||
import { Row, Col } from 'src/common/components'; | ||
import { FormControl, FormGroup } from 'react-bootstrap'; | ||
import { t, styled } from '@superset-ui/core'; | ||
import * as chrono from 'chrono-node'; | ||
import ModalTrigger from 'src/components/ModalTrigger'; | ||
|
@@ -140,7 +141,7 @@ const ScheduleQueryButton: FunctionComponent<ScheduleQueryButtonProps> = ({ | |
const renderModalBody = () => ( | ||
<FormGroup> | ||
<StyledRow> | ||
<Col md={12}> | ||
<Col xs={24}> | ||
<FormLabel className="control-label" htmlFor="embed-height"> | ||
{t('Label')} | ||
</FormLabel> | ||
|
@@ -153,7 +154,7 @@ const ScheduleQueryButton: FunctionComponent<ScheduleQueryButtonProps> = ({ | |
</Col> | ||
</StyledRow> | ||
<StyledRow> | ||
<Col md={12}> | ||
<Col xs={24}> | ||
<FormLabel className="control-label" htmlFor="embed-height"> | ||
{t('Description')} | ||
</FormLabel> | ||
|
@@ -166,7 +167,7 @@ const ScheduleQueryButton: FunctionComponent<ScheduleQueryButtonProps> = ({ | |
</Col> | ||
</StyledRow> | ||
<Row> | ||
<Col md={12}> | ||
<Col xs={24}> | ||
<div className="json-schema"> | ||
<Form | ||
schema={getJSONSchema()} | ||
|
@@ -179,7 +180,7 @@ const ScheduleQueryButton: FunctionComponent<ScheduleQueryButtonProps> = ({ | |
</Row> | ||
{scheduleQueryWarning && ( | ||
<Row> | ||
<Col md={12}> | ||
<Col xs={24}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure we even need these either. Not saying it should affect this PR, just something to consider. |
||
<small>{scheduleQueryWarning}</small> | ||
</Col> | ||
</Row> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,8 @@ | |
*/ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { Col, Row, FormGroup, FormControl } from 'react-bootstrap'; | ||
import { Row, Col } from 'src/common/components'; | ||
import { FormGroup, FormControl } from 'react-bootstrap'; | ||
import { t } from '@superset-ui/core'; | ||
import ControlHeader from '../ControlHeader'; | ||
|
||
|
@@ -87,8 +88,8 @@ export default class BoundsControl extends React.Component { | |
<div> | ||
<ControlHeader {...this.props} /> | ||
<FormGroup bsSize="small"> | ||
<Row> | ||
<Col xs={6}> | ||
<Row gutter={16}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we could use withTheme for these to get a hold of gridUnit, but it's not a blocker for this work I suppose. |
||
<Col xs={12}> | ||
<FormControl | ||
data-test="min-bound" | ||
type="text" | ||
|
@@ -97,7 +98,7 @@ export default class BoundsControl extends React.Component { | |
value={this.state.minMax[0]} | ||
/> | ||
</Col> | ||
<Col xs={6}> | ||
<Col xs={12}> | ||
<FormControl | ||
type="text" | ||
data-test="max-bound" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems OK, but if there's only one
Col
for each of these rows, I'm wondering if we even need the rows/cols at all. It seems like a good ol'div
would suffice.