You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by di...@apache.org on 2024/11/18 14:29:29 UTC
(superset) 01/01: fix(Card): Use correct class names for Ant Design 5 Card component
This is an automated email from the ASF dual-hosted git repository.
diegopucci pushed a commit to branch geido/fix/antd5-card-upgrade-classname
in repository https://gitbox.apache.org/repos/asf/superset.git
commit dcaafbf5dc6c29c20e917d35a6cd144d616c24f5
Author: Diego Pucci <di...@gmail.com>
AuthorDate: Mon Nov 18 16:29:08 2024 +0200
fix(Card): Use correct class names for Ant Design 5 Card component
---
superset-frontend/cypress-base/cypress/support/directories.ts | 6 +++---
superset-frontend/src/features/home/SavedQueries.tsx | 2 +-
superset-frontend/src/pages/Home/index.tsx | 6 +++---
superset-frontend/src/views/CRUD/utils.tsx | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/superset-frontend/cypress-base/cypress/support/directories.ts b/superset-frontend/cypress-base/cypress/support/directories.ts
index b59aa1bf81..d41d00727b 100644
--- a/superset-frontend/cypress-base/cypress/support/directories.ts
+++ b/superset-frontend/cypress-base/cypress/support/directories.ts
@@ -53,7 +53,7 @@ export const securityAccess = {
export const homePage = {
homeSection: {
sectionArea: '.ant-collapse-content-box',
- sectionElement: '.ant-card-meta-title',
+ sectionElement: '.antd5-card-meta-title',
},
sections: {
expandedSection: '.ant-collapse-item-active',
@@ -284,7 +284,7 @@ export const chartListView = {
},
card: {
card: dataTestLocator('styled-card'),
- cardCover: '[class="ant-card-cover"]',
+ cardCover: '[class="antd5-card-cover"]',
cardImage: '[class="gradient-container"]',
selectedStarIcon: "[aria-label='favorite-selected']",
unselectedStarIcon: "[aria-label='favorite-unselected']",
@@ -401,7 +401,7 @@ export const dashboardListView = {
},
card: {
card: dataTestLocator('styled-card'),
- cardCover: '[class="ant-card-cover"]',
+ cardCover: '[class="antd5-card-cover"]',
cardImage: '[class="gradient-container"]',
selectedStarIcon: "[aria-label='favorite-selected']",
unselectedStarIcon: "[aria-label='favorite-unselected']",
diff --git a/superset-frontend/src/features/home/SavedQueries.tsx b/superset-frontend/src/features/home/SavedQueries.tsx
index 55535fc501..45d69b1c99 100644
--- a/superset-frontend/src/features/home/SavedQueries.tsx
+++ b/superset-frontend/src/features/home/SavedQueries.tsx
@@ -74,7 +74,7 @@ export const CardStyles = styled.div`
a {
text-decoration: none;
}
- .ant-card-cover {
+ .antd5-card-cover {
border-bottom: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
& > div {
height: 171px;
diff --git a/superset-frontend/src/pages/Home/index.tsx b/superset-frontend/src/pages/Home/index.tsx
index c5e2c794b5..df382843a7 100644
--- a/superset-frontend/src/pages/Home/index.tsx
+++ b/superset-frontend/src/pages/Home/index.tsx
@@ -101,10 +101,10 @@ const WelcomeContainer = styled.div`
padding: 3px 21px;
}
}
- .ant-card-meta-description {
+ .antd5-card-meta-description {
margin-top: ${({ theme }) => theme.gridUnit}px;
}
- .ant-card.ant-card-bordered {
+ .antd5-card.ant-card-bordered {
border: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
}
.ant-collapse-item .ant-collapse-content {
@@ -119,7 +119,7 @@ const WelcomeContainer = styled.div`
}
.loading-cards {
margin-top: ${({ theme }) => theme.gridUnit * 8}px;
- .ant-card-cover > div {
+ .antd5-card-cover > div {
height: 168px;
}
}
diff --git a/superset-frontend/src/views/CRUD/utils.tsx b/superset-frontend/src/views/CRUD/utils.tsx
index 7b9274a904..785ac7f7ac 100644
--- a/superset-frontend/src/views/CRUD/utils.tsx
+++ b/superset-frontend/src/views/CRUD/utils.tsx
@@ -376,7 +376,7 @@ export const CardStyles = styled.div`
a {
text-decoration: none;
}
- .ant-card-cover > div {
+ .antd5-card-cover > div {
/* Height is calculated based on 300px width, to keep the same aspect ratio as the 800*450 thumbnails */
height: 168px;
}