nytai commented on a change in pull request #10606:
URL: 
https://github.com/apache/incubator-superset/pull/10606#discussion_r473177547



##########
File path: superset-frontend/src/components/ListViewCard/index.tsx
##########
@@ -163,31 +176,59 @@ function ListViewCard({
             <GradientContainer>
               <CardCoverImg
                 src={imgURL}
-                onError={e => {
-                  e.currentTarget.src = imgFallbackURL;
-                }}
+                fallback={imgFallbackURL}
+                isLoading={loading}
               />
             </GradientContainer>
           </a>
           <CoverFooter className="cover-footer">
-            {coverLeft && <CoverFooterLeft>{coverLeft}</CoverFooterLeft>}
-            {coverRight && <CoverFooterRight>{coverRight}</CoverFooterRight>}
+            {!loading && coverLeft && (
+              <CoverFooterLeft>{coverLeft}</CoverFooterLeft>
+            )}
+            {!loading && coverRight && (
+              <CoverFooterRight>{coverRight}</CoverFooterRight>
+            )}
           </CoverFooter>
         </Cover>
       }
     >
-      <Card.Meta
-        title={
-          <>
-            <TitleContainer>
-              <TitleLink href={url}>{title}</TitleLink>
-              {titleRight && <div className="title-right"> {titleRight}</div>}
-              <div className="card-actions">{actions}</div>
-            </TitleContainer>
-          </>
-        }
-        description={description}
-      />
+      {loading && (
+        <Card.Meta
+          title={
+            <>
+              <TitleContainer>
+                <Skeleton.Input active style={{ width: 250 }} size="small" />

Review comment:
       You are correct, they were generally not favorable (though I'm not so 
sure anymore with the rise in popularity of functional components and React's 
move to async rendering). However, these components just end up rendering divs 
with some loading shimmer styles, they're about a simple/dumb as components 
get. It won't have a measurable impact on performance in this instance. I'll 
move them to emotion though for consistency with other components.  




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to