geido commented on code in PR #32729:
URL: https://github.com/apache/superset/pull/32729#discussion_r2008109333
##########
superset-frontend/src/components/Form/FormItem.tsx:
##########
@@ -16,24 +16,23 @@
* specific language governing permissions and limitations
* under the License.
*/
-// eslint-disable-next-line no-restricted-imports
-import Form from 'antd/lib/form'; // TODO: Remove antd
+import { Form } from 'antd-v5';
import { styled } from '@superset-ui/core';
const StyledItem = styled(Form.Item)`
${({ theme }) => `
- .ant-form-item-label {
- padding-bottom: ${theme.sizeUnit}px;
+ .antd5-form-item {
+ margin-bottom: 0;
+ }
+ .antd5-form-item-label {
& > label {
- font-size: ${theme.fontSizeSM}px;
- color: ${theme.colors.grayscale.base};
-
- &.ant-form-item-required:not(.ant-form-item-required-mark-optional) {
+
&.antd5-form-item-required:not(.antd5-form-item-required-mark-optional) {
&::before {
display: none;
}
&::after {
display: inline-block;
+ visibility: visible;
color: ${theme.colorError};
Review Comment:
Isn't the color here already the correct one in vanilla?
##########
superset-frontend/src/components/Form/FormItem.tsx:
##########
@@ -16,24 +16,23 @@
* specific language governing permissions and limitations
* under the License.
*/
-// eslint-disable-next-line no-restricted-imports
-import Form from 'antd/lib/form'; // TODO: Remove antd
+import { Form } from 'antd-v5';
import { styled } from '@superset-ui/core';
const StyledItem = styled(Form.Item)`
${({ theme }) => `
- .ant-form-item-label {
- padding-bottom: ${theme.sizeUnit}px;
+ .antd5-form-item {
+ margin-bottom: 0;
+ }
+ .antd5-form-item-label {
& > label {
- font-size: ${theme.fontSizeSM}px;
- color: ${theme.colors.grayscale.base};
-
- &.ant-form-item-required:not(.ant-form-item-required-mark-optional) {
+
&.antd5-form-item-required:not(.antd5-form-item-required-mark-optional) {
&::before {
display: none;
}
&::after {
display: inline-block;
+ visibility: visible;
color: ${theme.colorError};
font-size: ${theme.fontSizeSM}px;
Review Comment:
Same here, do we need to change the font or vanilla is good?
##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.tsx:
##########
@@ -42,7 +42,7 @@ const Wrapper = styled.div`
padding: 0px ${({ theme }) => theme.sizeUnit * 4}px;
`;
-const CleanFormItem = styled(AntdForm.Item)`
+const CleanFormItem = styled(Form.Item)`
margin-bottom: 0;
Review Comment:
It seems we are still importing `Form` here?
##########
superset-frontend/src/explore/components/PropertiesModal/index.tsx:
##########
@@ -21,7 +21,7 @@ import { ChangeEvent, useMemo, useState, useCallback,
useEffect } from 'react';
import Modal from 'src/components/Modal';
import { Input, TextArea } from 'src/components/Input';
import Button from 'src/components/Button';
-import { AsyncSelect, Row, Col, AntdForm } from 'src/components';
+import { AsyncSelect, Row, Col } from 'src/components';
Review Comment:
@EnxDev is working on a PR that will change these imports. Could be better
to wait for that to be merged or at least keep an eye on these.
##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx:
##########
@@ -29,7 +29,7 @@ import {
useTheme,
} from '@superset-ui/core';
import { useDispatch } from 'react-redux';
-import { AntdForm } from 'src/components';
+import Form from 'src/components/Form/Form';
Review Comment:
Should not this be `import { Form } from 'src/components/Form';`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]