You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/05/07 10:56:13 UTC
[GitHub] [superset] michael-s-molina commented on a change in pull request #14502: refactor: Bootstrap to AntD - Form - iteration 3
michael-s-molina commented on a change in pull request #14502:
URL: https://github.com/apache/superset/pull/14502#discussion_r628118179
##########
File path: superset-frontend/src/SqlLab/components/ScheduleQueryButton.tsx
##########
@@ -139,42 +138,52 @@ const ScheduleQueryButton: FunctionComponent<ScheduleQueryButtonProps> = ({
};
const renderModalBody = () => (
- <FormGroup>
+ <Form layout="vertical">
<StyledRow>
<Col xs={24}>
- <FormLabel className="control-label" htmlFor="embed-height">
- {t('Label')}
- </FormLabel>
- <FormControl
- type="text"
- placeholder={t('Label for your query')}
- value={label}
- onChange={(event: any) => setLabel(event.target?.value)}
- />
+ <FormItem label={t('Label')}>
+ <Input
+ type="text"
+ placeholder={t('Label for your query')}
+ value={label}
+ onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
Review comment:
@geido I totally agree with you. I noticed that all screens were using forms just to reuse the layout spacing, but none were using validation, state management, etc. This problem is happening everywhere there is a form. The way I'm tackling this is to first get rid of Boostrap and try to avoid adding more refactoring the components. After that phase, we can revisit all the form components focusing specifically on using the form benefits. This needs a discussion because we need to decide if we're going to use form validation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org