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/03 15:00:37 UTC

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

michael-s-molina commented on a change in pull request #12920:
URL: https://github.com/apache/superset/pull/12920#discussion_r569482623



##########
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:
       Great question! I'm using the css prop instead of styled components as you can see in [Button](https://github.com/apache/superset/pull/12832) PR. Actually @rusackas asked me why I prefer this style on that PR and this was my answer:
   
   For me the use of a property seems more natural to the objective of customizing a component. [Here](https://benmcmahen.com/why-i-choose-emotion/#:~:text=The%20styled%20method%20uses%20the,to%20create%20buttons%20with%20styles.&text=With%20examples%20like%20this%2C%20it's,d%20use%20the%20style%20prop.) you will find a detailed explanation but to summarize:
   
   - You’re still writing regular React components
   - Object styles are easier to work with
   - Naming things is hard
   - You colocate styles with elements
   - Composition is dead easy
   
   I'm totally open for different opinions. @rusackas what do you think? 




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