Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading