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 2020/03/06 01:46:08 UTC

[GitHub] [incubator-superset] kristw commented on a change in pull request #9234: feat: improve loading speed for legacy table chart

kristw commented on a change in pull request #9234: feat: improve loading speed for legacy table chart
URL: https://github.com/apache/incubator-superset/pull/9234#discussion_r388672535
 
 

 ##########
 File path: superset-frontend/src/chart/ChartRenderer.jsx
 ##########
 @@ -222,13 +222,22 @@ class ChartRenderer extends React.Component {
       queryResponse,
     } = this.props;
 
+    let chartClassName = snakeCase(vizType);
+    // It's bad practice to use unprefixed `vizType` as classnames for chart
+    // container. It may cause css conflicts as in the case of table chart.
+    // When migrating legacy chart types, we should gradually add the prefix
+    // `superset-chart-` to each one of them.
+    if (vizType === 'table') {
 
 Review comment:
   could use `const` and ternary 
   
   ```ts
   const chartClassName = vizType === 'table' ? `superset-chart-${chartClassName}` : snakeCase(vizType);
   ```

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


With regards,
Apache Git Services

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