mirror of
https://github.com/apache/superset.git
synced 2026-06-05 15:49:27 +00:00
fix(theming): Remove leftover antd5 prefix (#34188)
This commit is contained in:
committed by
GitHub
parent
e8926f177d
commit
f756cee01b
@@ -45,7 +45,7 @@ interface HandleSelectProps {
|
||||
}
|
||||
|
||||
const menuItemStyles = (theme: any) => css`
|
||||
&.antd5-menu-item {
|
||||
&.ant-menu-item {
|
||||
height: auto;
|
||||
line-height: 1.4;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import {
|
||||
Radio as Antd5Radio,
|
||||
Radio as AntRadio,
|
||||
type CheckboxOptionType,
|
||||
type RadioGroupProps,
|
||||
} from 'antd';
|
||||
@@ -40,19 +40,19 @@ const RadioGroup = ({
|
||||
...props
|
||||
}: RadioGroupWrapperProps) => {
|
||||
const content = options.map((option: CheckboxOptionType) => (
|
||||
<Antd5Radio key={option.value} value={option.value}>
|
||||
<AntRadio key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</Antd5Radio>
|
||||
</AntRadio>
|
||||
));
|
||||
return (
|
||||
<Antd5Radio.Group {...props}>
|
||||
<AntRadio.Group {...props}>
|
||||
{spaceConfig ? <Space {...spaceConfig}>{content}</Space> : content}
|
||||
</Antd5Radio.Group>
|
||||
</AntRadio.Group>
|
||||
);
|
||||
};
|
||||
export const Radio = Object.assign(Antd5Radio, {
|
||||
export const Radio = Object.assign(AntRadio, {
|
||||
GroupWrapper: RadioGroup,
|
||||
Button: Antd5Radio.Button,
|
||||
Button: AntRadio.Button,
|
||||
});
|
||||
export type {
|
||||
RadioChangeEvent,
|
||||
|
||||
@@ -926,7 +926,7 @@ const SqlEditor: FC<Props> = ({
|
||||
css={css`
|
||||
margin-bottom: ${theme.sizeUnit * 2}px;
|
||||
padding-top: ${theme.sizeUnit * 4}px;
|
||||
.antd5-alert-action {
|
||||
.ant-alert-action {
|
||||
align-self: center;
|
||||
}
|
||||
`}
|
||||
|
||||
@@ -132,7 +132,7 @@ function GroupListModal({
|
||||
value: role.id,
|
||||
label: role.name,
|
||||
}))}
|
||||
getPopupContainer={trigger => trigger.closest('.antd5-modal-content')}
|
||||
getPopupContainer={trigger => trigger.closest('.ant-modal-content')}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem name="users" label={t('Users')}>
|
||||
|
||||
@@ -54,7 +54,7 @@ const Wrapper = styled.div`
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
|
||||
.antd5-input-number {
|
||||
.ant-input-number {
|
||||
min-width: 80px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -196,10 +196,10 @@ function ActionLogList() {
|
||||
}: any) => (
|
||||
<Typography.Text
|
||||
css={css`
|
||||
.antd5-typography-copy {
|
||||
.ant-typography-copy {
|
||||
visibility: hidden;
|
||||
}
|
||||
&:hover .antd5-typography-copy {
|
||||
&:hover .ant-typography-copy {
|
||||
visibility: visible;
|
||||
}
|
||||
`}
|
||||
@@ -224,10 +224,10 @@ function ActionLogList() {
|
||||
}: any) => (
|
||||
<Typography.Text
|
||||
css={css`
|
||||
.antd5-typography-copy {
|
||||
.ant-typography-copy {
|
||||
visibility: hidden;
|
||||
}
|
||||
&:hover .antd5-typography-copy {
|
||||
&:hover .ant-typography-copy {
|
||||
visibility: visible;
|
||||
}
|
||||
`}
|
||||
|
||||
@@ -62,7 +62,7 @@ const StyledCard = styled(Card)`
|
||||
margin-top: ${theme.marginXL}px;
|
||||
color: ${theme.colorBgContainer};
|
||||
background: ${theme.colorBgBase};
|
||||
.antd5-form-item-label label {
|
||||
.ant-form-item-label label {
|
||||
color: ${theme.colorPrimary};
|
||||
}
|
||||
`}
|
||||
|
||||
@@ -45,7 +45,7 @@ const StyledCard = styled(Card)`
|
||||
width: 50%;
|
||||
margin-top: ${theme.marginXL}px;
|
||||
background: ${theme.colorBgBase};
|
||||
.antd5-form-item-label label {
|
||||
.ant-form-item-label label {
|
||||
color: ${theme.colorPrimary};
|
||||
}
|
||||
`}
|
||||
|
||||
@@ -54,11 +54,11 @@ const DescriptionsContainer = styled.div`
|
||||
|
||||
const StyledLayout = styled.div`
|
||||
${({ theme }) => css`
|
||||
.antd5-row {
|
||||
.ant-row {
|
||||
margin: 0px ${theme.sizeUnit * 3}px ${theme.sizeUnit * 6}px
|
||||
${theme.sizeUnit * 3}px;
|
||||
}
|
||||
&& .menu > .antd5-menu {
|
||||
&& .menu > .ant-menu {
|
||||
padding: 0px;
|
||||
}
|
||||
&& .nav-right {
|
||||
|
||||
@@ -108,8 +108,8 @@ class WebDriverPlaywright(WebDriverProxy):
|
||||
alert_div.get_by_role("button").click()
|
||||
|
||||
# wait for modal to show up
|
||||
page.locator(".antd5-modal-content").wait_for(state="visible")
|
||||
err_msg_div = page.locator(".antd5-modal-content .antd5-modal-body")
|
||||
page.locator(".ant-modal-content").wait_for(state="visible")
|
||||
err_msg_div = page.locator(".ant-modal-content .ant-modal-body")
|
||||
#
|
||||
# # collect error message
|
||||
error_messages.append(err_msg_div.text_content())
|
||||
@@ -118,10 +118,10 @@ class WebDriverPlaywright(WebDriverProxy):
|
||||
error_as_html = err_msg_div.inner_html().replace("'", "\\'")
|
||||
#
|
||||
# # close modal after collecting error messages
|
||||
page.locator(".antd5-modal-content .antd5-modal-close").click()
|
||||
page.locator(".ant-modal-content .ant-modal-close").click()
|
||||
#
|
||||
# # wait until the modal becomes invisible
|
||||
page.locator(".antd5-modal-content").wait_for(state="detached")
|
||||
page.locator(".ant-modal-content").wait_for(state="detached")
|
||||
try:
|
||||
# Even if some errors can't be updated in the screenshot,
|
||||
# keep all the errors in the server log and do not fail the loop
|
||||
@@ -347,17 +347,17 @@ class WebDriverSelenium(WebDriverProxy):
|
||||
current_app.config["SCREENSHOT_WAIT_FOR_ERROR_MODAL_VISIBLE"],
|
||||
).until(
|
||||
EC.visibility_of_any_elements_located(
|
||||
(By.CLASS_NAME, "antd5-modal-content")
|
||||
(By.CLASS_NAME, "ant-modal-content")
|
||||
)
|
||||
)[0]
|
||||
|
||||
err_msg_div = modal.find_element(By.CLASS_NAME, "antd5-modal-body")
|
||||
err_msg_div = modal.find_element(By.CLASS_NAME, "ant-modal-body")
|
||||
|
||||
# collect error message
|
||||
error_messages.append(err_msg_div.text)
|
||||
|
||||
# close modal after collecting error messages
|
||||
modal.find_element(By.CLASS_NAME, "antd5-modal-close").click()
|
||||
modal.find_element(By.CLASS_NAME, "ant-modal-close").click()
|
||||
|
||||
# wait until the modal becomes invisible
|
||||
WebDriverWait(
|
||||
|
||||
Reference in New Issue
Block a user