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_r389133180
##########
File path: superset-frontend/src/chart/ChartRenderer.jsx
##########
@@ -222,13 +222,21 @@ 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.
+ chartClassName =
Review comment:
What do you think of
```ts
const snakeCaseVizType = snakeCase(vizType);
const chartClassName = vizType === 'table' ?
`superset-chart-${snakeCaseVizType}` : snakeCaseVizType;
```
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]