ktmud commented on a change in pull request #12920:
URL: https://github.com/apache/superset/pull/12920#discussion_r570481809



##########
File path: superset-frontend/src/SqlLab/components/SqlEditorLeftBar.jsx
##########
@@ -145,13 +146,38 @@ export default class SqlEditorLeftBar extends 
React.PureComponent {
         <div className="divider" />
         <StyledScrollbarContainer>
           <StyledScrollbarContent contentHeight={tableMetaDataHeight}>
-            {this.props.tables.map(table => (
-              <TableElement
-                table={table}
-                key={table.id}
-                actions={this.props.actions}
-              />
-            ))}
+            <Collapse
+              ghost
+              expandIconPosition="right"
+              css={theme => css`

Review comment:
       I'm a bigger fan of the `css` prop only because creating a new component 
is maintenance than just dumping things inline. Unless we will reuse the style 
in multiple components or the CSS is really really long, there is no additional 
benefit of creating new styled components.
   
   On a related note, I think it'd also be easier to use more nested styles 
than creating separate styled components for each child element (like 
[here](https://github.com/apache/superset/blob/465d986617233ab401c99f9eab0f55488e0dae09/superset-frontend/src/dashboard/components/nativeFilters/FilterBar.tsx#L122)
 and 
[here](https://github.com/apache/superset/blob/c72c39bffd2ac881629b35b906fe6400c4bfe5f2/superset-frontend/src/dashboard/components/nativeFilters/CancelConfirmationAlert.tsx#L25))
   
   You may have a higher change of css classname conflict, but that should be 
manageable with proper namespacing.




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