You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2024/11/11 18:40:47 UTC

Re: [PR] chore(AntD5): touchup on component imports/exports, theming ListViewCard [superset]

rusackas commented on code in PR #29545:
URL: https://github.com/apache/superset/pull/29545#discussion_r1837066415


##########
superset-frontend/src/components/ListViewCard/index.tsx:
##########
@@ -188,98 +191,101 @@ function ListViewCard({
   const Link = url && linkComponent ? linkComponent : AnchorLink;
   const theme = useTheme();
   return (
-    <StyledCard
-      data-test="styled-card"
-      cover={
-        cover || (
-          <Cover>
-            <Link to={url!}>
-              <div className="gradient-container">
-                <ImageLoader
-                  src={imgURL || ''}
-                  fallback={imgFallbackURL || ''}
-                  isLoading={loading}
-                  position={imgPosition}
-                />
-              </div>
-            </Link>
-            <CoverFooter className="cover-footer">
-              {!loading && coverLeft && (
-                <CoverFooterLeft>{coverLeft}</CoverFooterLeft>
-              )}
-              {!loading && coverRight && (
-                <CoverFooterRight>{coverRight}</CoverFooterRight>
-              )}
-            </CoverFooter>
-          </Cover>
-        )
-      }
-    >
-      {loading && (
-        <AntdCard.Meta
-          title={
-            <>
-              <TitleContainer>
-                <Skeleton.Input
-                  active
-                  size="small"
-                  css={{
-                    width: Math.trunc(theme.gridUnit * 62.5),
-                  }}
-                />
-                <div className="card-actions">
-                  <Skeleton.Button active shape="circle" />{' '}
-                  <Skeleton.Button
+    <ConfigProvider theme={listViewCardTheme}>
+      <StyledCard
+        data-test="styled-card"
+        padded
+        cover={
+          cover || (
+            <Cover>
+              <Link to={url!}>
+                <div className="gradient-container">
+                  <ImageLoader
+                    src={imgURL || ''}
+                    fallback={imgFallbackURL || ''}
+                    isLoading={loading}
+                    position={imgPosition}
+                  />
+                </div>
+              </Link>
+              <CoverFooter className="cover-footer">
+                {!loading && coverLeft && (
+                  <CoverFooterLeft>{coverLeft}</CoverFooterLeft>
+                )}
+                {!loading && coverRight && (
+                  <CoverFooterRight>{coverRight}</CoverFooterRight>
+                )}
+              </CoverFooter>
+            </Cover>
+          )
+        }
+      >
+        {loading && (
+          <Card.Meta
+            title={
+              <>
+                <TitleContainer>
+                  <Skeleton.Input
                     active
+                    size="small"
                     css={{
-                      width: theme.gridUnit * 10,
+                      width: Math.trunc(theme.gridUnit * 62.5),

Review Comment:
   This already got merged (agian) elsewhere... 
   
   If you search (using vscode) for `gridUnit\s*\*\s*\d+\.\d+` you'll see a whole swath of these that need cleanup. Seems like a good rainy-day PR, and (hopefully) a listing rule could be added.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org