Conversation
9228382 to
5b80c6f
Compare
| * Set to true to send the ConfirmDialog. | ||
| */ | ||
| displayed: PropTypes.bool, | ||
| displayed: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.bool]), |
There was a problem hiding this comment.
Necessary because of this test, since it will set displayed=None. Or, should we change that test and keep this as only PropTypes.bool
| * in the format 'YYYY-MM-DD' | ||
| */ | ||
| start_date: PropTypes.string, | ||
| start_date: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]), |
There was a problem hiding this comment.
Technically a Python datetime object is stored, which is automatically serialized to a string; however, validation occurs before serialization, so we need this so the validation schema is automatically generated to accept datetime objects.
| const points = []; | ||
|
|
||
| if (isNil(eventData)) { | ||
| if (isNil(eventData) || isNil(eventData.points)) { |
There was a problem hiding this comment.
Was throwing front-end error is eventData.points was undefined.
src/components/Graph.react.js
Outdated
|
|
||
| if (animate && this._hasPlotted && figure.data.length === gd.data.length) { | ||
| if (animate && this._hasPlotted && | ||
| !isNil(figure) && !isNil(gd) && |
There was a problem hiding this comment.
Was throwing front-end errors.
src/components/Location.react.js
Outdated
| pathname: PropTypes.string, | ||
| pathname: PropTypes.oneOfType([ | ||
| PropTypes.string, | ||
| PropTypes.oneOf([null]) |
There was a problem hiding this comment.
Added because of this test, which results in an initial callback setting pathname=None. We can change the test instead.
| */ | ||
| marks: PropTypes.shape({ | ||
| number: PropTypes.oneOfType([ | ||
| marks: PropTypes.objectOf( |
There was a problem hiding this comment.
This just had the wrong schema initially.
src/components/Tabs.react.js
Outdated
| return child.props.children.props.value === this.state.selected; | ||
| }); | ||
| if ('props' in selectedTab[0]) { | ||
| if (selectedTab[0] && 'props' in selectedTab[0]) { |
There was a problem hiding this comment.
Was throwing front-end exceptions.
src/components/Tabs.react.js
Outdated
| * Array that holds Tab components | ||
| */ | ||
| children: PropTypes.node, | ||
| children: PropTypes.node.isRequired, |
There was a problem hiding this comment.
Front-end exceptions when this is None.
|
@rmarren1 What's the status of this PR? Is this blocked or moot? If blocked, what can we do to help unblock it. Just doing sanity checks on PRs that have been outstanding for a while. Thanks! |
|
@Marc-Andre-Rivet This is dependent on plotly/dash#452 which is still awaiting approval. I'll update the top level to explain that! (It was linked to old version of the PR). |
|
Close this PR as we shifted the validation in dash-renderer #100 |
This PR is dependent on the validation PR plotly/dash#452, and consists of the Dash Core Components generated with schemas, some tests, and some modifications to DCC prop-types to make validation work.