msyavuz commented on code in PR #33231:
URL: https://github.com/apache/superset/pull/33231#discussion_r2081383609
##########
superset-frontend/packages/superset-ui-chart-controls/src/components/ControlHeader.tsx:
##########
@@ -88,10 +90,19 @@ export function ControlHeader({
return null;
}
const labelClass = validationErrors.length > 0 ? 'text-danger' : '';
+ const labelColor = validationErrors.length > 0 ? 'danger' : undefined;
+ const labelStyle = { cursor: onClick ? 'pointer' : undefined };
+
return (
<div className="ControlHeader" data-test={`${name}-header`}>
<div className="pull-left">
- <label className="control-label" htmlFor={name}>
+ <Typography.Text
+ className="control-label"
+ type={labelColor}
+ onClick={onClick}
+ style={labelStyle}
+ strong
+ >
Review Comment:
Let's not replace <label>. I don't think there is a replacement in Ant
Design. We use label as is in frontend as well.
##########
superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx:
##########
@@ -18,8 +18,7 @@
*/
import { ControlHeader } from '@superset-ui/chart-controls';
import { css, styled, t } from '@superset-ui/core';
-// eslint-disable-next-line no-restricted-imports
-import { Form, Tag } from 'antd'; // TODO: Remove antd
+import { Form, Tag } from 'src/components';
Review Comment:
Have we tested if this works? I don't think we have a sample chart for
cartodiagram which this component is only used in
##########
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx:
##########
@@ -196,38 +198,34 @@ function SelectPageSize({
current,
onChange,
}: SelectPageSizeRendererProps) {
+ const { Option } = Select;
+
return (
- <span
- className="dt-select-page-size form-inline"
- role="group"
- aria-label={t('Select page size')}
- >
- <label htmlFor="pageSizeSelect" className="sr-only">
- {t('Select page size')}
- </label>
Review Comment:
I think this was for accessibility. We can probably keep this as well
##########
superset-frontend/packages/superset-ui-demo/storybook/shared/components/Expandable.tsx:
##########
@@ -18,6 +18,7 @@
*/
import { Component, ReactNode } from 'react';
+import { Button } from 'antd-v5';
Review Comment:
I don't think this is installed in superset-ui-demo?
--
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]