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 2018/08/14 23:30:52 UTC

[GitHub] mistercrunch closed pull request #5626: Tackling late-arriving comments from #5186

mistercrunch closed pull request #5626: Tackling late-arriving comments from #5186
URL: https://github.com/apache/incubator-superset/pull/5626
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/assets/src/CRUD/CollectionTable.jsx b/superset/assets/src/CRUD/CollectionTable.jsx
index 4520225740..2cbc132623 100644
--- a/superset/assets/src/CRUD/CollectionTable.jsx
+++ b/superset/assets/src/CRUD/CollectionTable.jsx
@@ -8,11 +8,10 @@ import { recurseReactClone } from './utils';
 import './styles.css';
 
 const propTypes = {
-  collection: PropTypes.array,
+  collection: PropTypes.arrayOf(PropTypes.object).isRequired,
   itemGenerator: PropTypes.func,
   columnLabels: PropTypes.object,
-  tableColumns: PropTypes.array,
-  columns: PropTypes.array,
+  tableColumns: PropTypes.array.isRequired,
   onChange: PropTypes.func,
   itemRenderers: PropTypes.object,
   allowDeletes: PropTypes.bool,
@@ -29,6 +28,8 @@ const defaultProps = {
   emptyMessage: 'No entries',
   allowAddItem: false,
   itemGenerator: () => ({}),
+  expandFieldset: null,
+  extraButtons: null,
 };
 const Frame = props => (
   <div className="frame">
@@ -100,6 +101,7 @@ export default class CRUDCollection extends React.PureComponent {
     const { columnLabels } = this.props;
     let label = columnLabels[col] ? columnLabels[col] : col;
     if (label.startsWith('__')) {
+      // special label-free columns (ie: caret for expand, delete cross)
       label = '';
     }
     return label;
diff --git a/superset/assets/src/CRUD/Field.jsx b/superset/assets/src/CRUD/Field.jsx
index 0fa0ad7a73..6b7b87070e 100644
--- a/superset/assets/src/CRUD/Field.jsx
+++ b/superset/assets/src/CRUD/Field.jsx
@@ -7,8 +7,8 @@ import {
 import './styles.less';
 
 const propTypes = {
-  value: PropTypes.any,
-  label: PropTypes.string,
+  value: PropTypes.any.isRequired,
+  label: PropTypes.string.isRequired,
   descr: PropTypes.node,
   fieldKey: PropTypes.string.isRequired,
   control: PropTypes.node.isRequired,
@@ -19,6 +19,7 @@ const defaultProps = {
   controlProps: {},
   onChange: () => {},
   compact: false,
+  desc: null,
 };
 
 export default class Field extends React.PureComponent {
diff --git a/superset/assets/src/CRUD/Fieldset.jsx b/superset/assets/src/CRUD/Fieldset.jsx
index 6c3c74e9ba..6b03c0743f 100644
--- a/superset/assets/src/CRUD/Fieldset.jsx
+++ b/superset/assets/src/CRUD/Fieldset.jsx
@@ -6,14 +6,15 @@ import { recurseReactClone } from './utils';
 import Field from './Field';
 
 const propTypes = {
-  children: PropTypes.node,
-  onChange: PropTypes.func,
-  item: PropTypes.object,
+  children: PropTypes.node.isRequired,
+  onChange: PropTypes.func.isRequired,
+  item: PropTypes.object.isRequired,
   title: PropTypes.node,
   compact: PropTypes.bool,
 };
 const defaultProps = {
   compact: false,
+  title: null,
 };
 
 export default class Fieldset extends React.PureComponent {
diff --git a/superset/assets/src/components/EditableTitle.jsx b/superset/assets/src/components/EditableTitle.jsx
index 5e206c91e8..a3df712001 100644
--- a/superset/assets/src/components/EditableTitle.jsx
+++ b/superset/assets/src/components/EditableTitle.jsx
@@ -19,6 +19,7 @@ const defaultProps = {
   showTooltip: true,
   onSaveTitle: () => {},
   emptyText: '<empty>',
+  style: null,
 };
 
 export default class EditableTitle extends React.PureComponent {
diff --git a/superset/assets/src/datasource/DatasourceModal.jsx b/superset/assets/src/datasource/DatasourceModal.jsx
index cef993bc68..690dc8e137 100644
--- a/superset/assets/src/datasource/DatasourceModal.jsx
+++ b/superset/assets/src/datasource/DatasourceModal.jsx
@@ -2,16 +2,16 @@ import React from 'react';
 import PropTypes from 'prop-types';
 import { Alert, Button, Modal } from 'react-bootstrap';
 import Dialog from 'react-bootstrap-dialog';
+import $ from 'jquery';
 
 import { t } from '../locales';
 import DatasourceEditor from '../datasource/DatasourceEditor';
 import withToasts from '../messageToasts/enhancers/withToasts';
 
-const $ = window.$ = require('jquery');
 
 const propTypes = {
   onChange: PropTypes.func,
-  datasource: PropTypes.object,
+  datasource: PropTypes.object.isRequired,
   show: PropTypes.bool.isRequired,
   onHide: PropTypes.func,
   onDatasourceSave: PropTypes.func,
@@ -22,6 +22,7 @@ const defaultProps = {
   onChange: () => {},
   onHide: () => {},
   onDatasourceSave: () => {},
+  show: false,
 };
 
 class DatasourceModal extends React.PureComponent {
@@ -41,6 +42,7 @@ class DatasourceModal extends React.PureComponent {
     this.onDatasourceChange = this.onDatasourceChange.bind(this);
     this.onClickSave = this.onClickSave.bind(this);
     this.onConfirmSave = this.onConfirmSave.bind(this);
+    this.setDialogRef = this.setDialogRef.bind(this);
   }
   onClickSave() {
     this.dialog.show({
@@ -90,6 +92,9 @@ class DatasourceModal extends React.PureComponent {
   setSearchRef(searchRef) {
     this.searchRef = searchRef;
   }
+  setDialogRef(ref) {
+    this.dialog = ref;
+  }
   toggleShowDatasource() {
     this.setState({ showDatasource: !this.state.showDatasource });
   }
@@ -149,7 +154,7 @@ class DatasourceModal extends React.PureComponent {
               {t('Save')}
             </Button>
             <Button bsSize="sm" onClick={this.props.onHide}>{t('Cancel')}</Button>
-            <Dialog ref={(el) => { this.dialog = el; }} />
+            <Dialog ref={this.setDialogRef} />
           </span>
         </Modal.Footer>
       </Modal>);
diff --git a/superset/assets/src/explore/components/controls/CheckboxControl.jsx b/superset/assets/src/explore/components/controls/CheckboxControl.jsx
index 4c15c374e7..6f785cbc66 100644
--- a/superset/assets/src/explore/components/controls/CheckboxControl.jsx
+++ b/superset/assets/src/explore/components/controls/CheckboxControl.jsx
@@ -4,10 +4,8 @@ import ControlHeader from '../ControlHeader';
 import Checkbox from '../../../components/Checkbox';
 
 const propTypes = {
-  name: PropTypes.string,
   value: PropTypes.bool,
   label: PropTypes.string,
-  description: PropTypes.string,
   onChange: PropTypes.func,
 };
 


 

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