mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-23 21:28:11 +08:00
* mocks for redux refactor - for discussion * more API design on redux refactor * add new reuqired dependencies for build * change babel target to use modern browser * remove dead code * remove dead code - joy plots * checkpoint on redux refactoring * checkpoint on redux refactoring * fix mistaken rebase conflict resolution * dead code removal; add name to dataframe backmap * rename dataframe to universe * update eslint config to more closely match prettier * lint * more eslint updates to match prettier * additional config to make eslint match prettier * add expression data to Universe/World * remove obsolete reducers * lint fixes * more eslint cleanup * lint * lint * fix but in countAllOnes when dimensions gt 1 * lint; do not display name metadata field * lint; colors refactor * lint; colors refactor * update comments * first cut at regraph and reset * enable object-curly-braces consistent mode * lint, handle regraph with no selection * fix expression scatterplot bugs * fix regression legend display * add expression data cache * remove console logging * reset cell color on regraph/reset * remove obsolete server URLs * rename UniverseV01 to Universe_REST_API_v01 * add additional comments on the varDataCache * merge universe reducer into controls reducer; simplify initialization-related actions * use spread operator * fix erroneous comment * convert universe and world state to plain objects, and functionalize supporting code (remove ES6 classes) * use spread operator * lint * improve variable names * rename obsCrossfilter to crossfilter and obsDimensionMap to dimensionMap * rename controls2 to controls
This commit is contained in:
@@ -7,9 +7,7 @@ import { connect } from "react-redux";
|
||||
// import PulseLoader from "halogen/PulseLoader";
|
||||
|
||||
import LeftSideBar from "./leftsidebar";
|
||||
import Parallel from "./continuous/parallel";
|
||||
import Legend from "./continuousLegend";
|
||||
// import Joy from "./joy/joy";
|
||||
import Graph from "./graph/graph";
|
||||
import * as globals from "../globals";
|
||||
import actions from "../actions";
|
||||
@@ -18,8 +16,8 @@ import SectionHeader from "./framework/sectionHeader";
|
||||
|
||||
@connect(state => {
|
||||
return {
|
||||
cells: state.cells,
|
||||
initialize: state.initialize
|
||||
loading: state.controls.loading,
|
||||
error: state.controls.error
|
||||
};
|
||||
})
|
||||
class App extends React.Component {
|
||||
@@ -27,20 +25,18 @@ class App extends React.Component {
|
||||
super(props);
|
||||
this.state = {};
|
||||
}
|
||||
|
||||
_onURLChanged() {
|
||||
this.props.dispatch({ type: "url changed", url: document.location.href });
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
/* listen for url changes, fire one when we start the app up */
|
||||
window.addEventListener("popstate", this._onURLChanged);
|
||||
this._onURLChanged();
|
||||
|
||||
this.props.dispatch(actions.initialize());
|
||||
this.props.dispatch(actions.doInitialDataLoad(window.location.search));
|
||||
|
||||
/*
|
||||
first request includes query straight off the url bar for now
|
||||
*/
|
||||
this.props.dispatch(actions.requestCells(window.location.search));
|
||||
/* listen for resize events */
|
||||
window.addEventListener("resize", () => {
|
||||
this.props.dispatch({
|
||||
@@ -61,10 +57,11 @@ class App extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { loading, error } = this.props;
|
||||
return (
|
||||
<Container>
|
||||
<Helmet title="cellxgene" />
|
||||
{this.props.cells.loading || this.props.initialize.loading ? (
|
||||
{loading ? (
|
||||
<div
|
||||
style={{
|
||||
position: "fixed",
|
||||
@@ -76,12 +73,9 @@ class App extends React.Component {
|
||||
loading cellxgene
|
||||
</div>
|
||||
) : null}
|
||||
{this.props.cells.error ? "Error loading cells" : null}
|
||||
|
||||
{error ? "Error loading cells" : null}
|
||||
<div>
|
||||
{this.props.cells.loading || this.props.initialize.loading ? null : (
|
||||
<LeftSideBar />
|
||||
)}
|
||||
{loading ? null : <LeftSideBar />}
|
||||
<div
|
||||
style={{
|
||||
padding: 15,
|
||||
@@ -89,13 +83,10 @@ class App extends React.Component {
|
||||
marginLeft: 350 /* but responsive */
|
||||
}}
|
||||
>
|
||||
{this.props.cells.loading ||
|
||||
this.props.initialize.loading ? null : (
|
||||
<Graph />
|
||||
)}
|
||||
{loading ? null : <Graph />}
|
||||
|
||||
<Legend />
|
||||
{/*<Parallel/>*/}
|
||||
{}
|
||||
</div>
|
||||
</div>
|
||||
</Container>
|
||||
@@ -104,5 +95,3 @@ class App extends React.Component {
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
||||
// <Joy data={this.state.expressions && this.state.expressions.data} />
|
||||
|
||||
Reference in New Issue
Block a user