Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dash Clientside Transformations #142

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7,072 changes: 3,632 additions & 3,440 deletions dash_renderer/dash_renderer.dev.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_renderer/dash_renderer.min.js.map

Large diffs are not rendered by default.

21 changes: 7 additions & 14 deletions src/APIController.react.js
Expand Up @@ -4,7 +4,7 @@ import React, {Component} from 'react';
import PropTypes from 'prop-types';
import TreeContainer from './TreeContainer';
import {
computeGraphs,
computeDerivedState,
computePaths,
hydrateInitialOutputs,
setLayout,
Expand Down Expand Up @@ -52,23 +52,16 @@ class UnconnectedContainer extends Component {

if (isEmpty(dependenciesRequest)) {
dispatch(getDependencies());
} else if (
dependenciesRequest.status === STATUS.OK &&
isEmpty(graphs)
) {
dispatch(computeGraphs(dependenciesRequest.content));
} else if (dependenciesRequest.status === STATUS.OK &&
layoutRequest.status === STATUS.OK &&
!isEmpty(layout) &&
isEmpty(graphs)) {
computeDerivedState(dispatch, layout, dependenciesRequest);
}

if (
// dependenciesRequest and its computed stores
dependenciesRequest.status === STATUS.OK &&
!isEmpty(graphs) &&
// LayoutRequest and its computed stores
layoutRequest.status === STATUS.OK &&
!isEmpty(layout) &&
!isNil(paths) &&
// Hasn't already hydrated
appLifecycle === getAppState('STARTED')
(appLifecycle === getAppState('STARTED'))
) {
dispatch(hydrateInitialOutputs());
}
Expand Down
1 change: 1 addition & 0 deletions src/actions/constants.js
Expand Up @@ -8,6 +8,7 @@ export const getAction = action => {
SET_APP_LIFECYCLE: 'SET_APP_LIFECYCLE',
READ_CONFIG: 'READ_CONFIG',
SET_HOOKS: 'SET_HOOKS',
SET_CLIENTSIDE_MAPPING: 'SET_CLIENTSIDE_MAPPING'
};
if (actionList[action]) {
return actionList[action];
Expand Down