Skip to content

Commit

Permalink
fix(Card): Use correct class names for Ant Design 5 Card component (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
geido authored Nov 18, 2024
1 parent 1b63b8f commit c6685a7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions superset-frontend/cypress-base/cypress/support/directories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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']",
Expand Down Expand Up @@ -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']",
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/features/home/SavedQueries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions superset-frontend/src/pages/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/CRUD/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c6685a7

Please sign in to comment.