You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/02/04 19:18:51 UTC

[GitHub] [superset] ktmud commented on a change in pull request #12920: refactor: Bootstrap to AntD - Collapse

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:
users@infra.apache.org



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