mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-07 04:08:13 +08:00
prototyping
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
// jshint esversion: 6
|
||||||
|
/* rc slider https://www.npmjs.com/package/rc-slider */
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
import _ from "lodash";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import HistogramBrush from "../brushableHistogram";
|
||||||
|
import * as globals from "../../globals";
|
||||||
|
import actions from "../../actions";
|
||||||
|
|
||||||
|
@connect(state => {
|
||||||
|
return {};
|
||||||
|
})
|
||||||
|
class GeneSet extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { setName, setGenes } = this.props;
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{setName}
|
||||||
|
{_.map(setGenes, gene => {
|
||||||
|
return <p key={gene}> {gene} </p>;
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default GeneSet;
|
||||||
@@ -4,8 +4,8 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import fuzzysort from "fuzzysort";
|
import fuzzysort from "fuzzysort";
|
||||||
|
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
|
import { Suggest } from "@blueprintjs/select";
|
||||||
import {
|
import {
|
||||||
MenuItem,
|
MenuItem,
|
||||||
Button,
|
Button,
|
||||||
@@ -13,7 +13,6 @@ import {
|
|||||||
InputGroup,
|
InputGroup,
|
||||||
ControlGroup
|
ControlGroup
|
||||||
} from "@blueprintjs/core";
|
} from "@blueprintjs/core";
|
||||||
import { Suggest } from "@blueprintjs/select";
|
|
||||||
import HistogramBrush from "../brushableHistogram";
|
import HistogramBrush from "../brushableHistogram";
|
||||||
import * as globals from "../../globals";
|
import * as globals from "../../globals";
|
||||||
import actions from "../../actions";
|
import actions from "../../actions";
|
||||||
@@ -21,8 +20,10 @@ import {
|
|||||||
postUserErrorToast,
|
postUserErrorToast,
|
||||||
keepAroundErrorToast
|
keepAroundErrorToast
|
||||||
} from "../framework/toasters";
|
} from "../framework/toasters";
|
||||||
|
import GeneSet from "./geneSet";
|
||||||
|
|
||||||
import { memoize } from "../../util/dataframe/util";
|
import { memoize } from "../../util/dataframe/util";
|
||||||
|
import testGeneSets from "./test_data";
|
||||||
|
|
||||||
const renderGene = (fuzzySortResult, { handleClick, modifiers }) => {
|
const renderGene = (fuzzySortResult, { handleClick, modifiers }) => {
|
||||||
if (!modifiers.matchesPredicate) {
|
if (!modifiers.matchesPredicate) {
|
||||||
@@ -142,6 +143,18 @@ class GeneExpression extends React.Component {
|
|||||||
return undefined;
|
return undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
renderTestGeneSets = () => {
|
||||||
|
const sets = [];
|
||||||
|
|
||||||
|
_.forEach(testGeneSets, (setGenes, setName) => {
|
||||||
|
sets.push(
|
||||||
|
<GeneSet key={setName} setGenes={setGenes} setName={setName} />
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
return sets;
|
||||||
|
};
|
||||||
|
|
||||||
placeholderGeneNames() {
|
placeholderGeneNames() {
|
||||||
/*
|
/*
|
||||||
return a string containing gene name suggestions for use as a user hint.
|
return a string containing gene name suggestions for use as a user hint.
|
||||||
@@ -362,6 +375,7 @@ class GeneExpression extends React.Component {
|
|||||||
})
|
})
|
||||||
: null}
|
: null}
|
||||||
</div>
|
</div>
|
||||||
|
<div>{this.renderTestGeneSets()}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user