graceguo-supercat commented on a change in pull request #3581: Dashboard 
refactory
URL: 
https://github.com/apache/incubator-superset/pull/3581#discussion_r146447069
 
 

 ##########
 File path: superset/assets/javascripts/dashboard/components/SliceContainer.jsx
 ##########
 @@ -0,0 +1,198 @@
+/* eslint-disable react/no-danger */
+import React from 'react';
+import PropTypes from 'prop-types';
+import { bindActionCreators } from 'redux';
+import { connect } from 'react-redux';
+
+import SliceHeader from './SliceHeader';
+import Slice from './Slice';
+import StackTraceMessage from '../../components/StackTraceMessage';
+import vizMap from '../../../visualizations/main';
+import * as Actions from '../actions';
+import { t } from '../../locales';
+
+import '../../../stylesheets/dashboard.css';
+
+const propTypes = {
+  actions: PropTypes.object.isRequired,
+  formData: PropTypes.object,
+  timeout: PropTypes.number,
+  datasource: PropTypes.object,
+  isLoading: PropTypes.bool,
+  isExpanded: PropTypes.bool,
+  widgetHeight: PropTypes.number,
+  widgetWidth: PropTypes.number,
+  fetchSlice: PropTypes.func,
+  removeSlice: PropTypes.func.isRequired,
+  updateSliceName: PropTypes.func,
+  getFormDataExtra: PropTypes.func,
+  slice: PropTypes.object,
+  filters: PropTypes.object,
+  refresh: PropTypes.bool,
+};
+
+class SliceContainer extends React.PureComponent {
 
 Review comment:
   Please see the latest commit. Now i wrap name component like 
`ChartContainer`, `Chart`, and `ChartBody`. 
   `ChartContainer` is redux container.
   `Chart` only responsible for chart rendering part. It's parent component, 
either dashboard or explore view, provide header controls.
   `ChartBody` provides dom operation wrapper called from d3.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to