run prettier(2.0.5) (#1438)

This commit is contained in:
Severiano Badajoz
2020-05-04 10:26:42 -07:00
committed by GitHub
parent b255e32548
commit 6cccc41c0f
118 changed files with 1979 additions and 1584 deletions
@@ -12,7 +12,7 @@ class CellSetButton extends React.PureComponent {
differential,
crossfilter,
dispatch,
eitherCellSetOneOrTwo
eitherCellSetOneOrTwo,
} = this.props;
// Reducer and components assume that value will be null if
@@ -25,7 +25,7 @@ class CellSetButton extends React.PureComponent {
/* diffexp needs to be cleared before we store a new set */
dispatch({
type: `store current cell selection as differential set ${eitherCellSetOneOrTwo}`,
data: set
data: set,
});
}
}
+7 -7
View File
@@ -6,7 +6,7 @@ import {
Popover,
NumericInput,
Icon,
Tooltip
Tooltip,
} from "@blueprintjs/core";
import { tooltipHoverOpenDelay } from "../../globals";
@@ -21,7 +21,7 @@ function Clip(props) {
isClipDisabled,
handleClipOnKeyPress,
handleClipPercentileMaxValueChange,
handleClipPercentileMinValueChange
handleClipPercentileMinValueChange,
} = props;
const clipMin =
@@ -37,7 +37,7 @@ function Clip(props) {
<div
className="bp3-button-group"
style={{
marginRight: 10
marginRight: 10,
}}
>
<Popover
@@ -52,7 +52,7 @@ function Clip(props) {
data-testid="visualization-settings"
className={`bp3-button bp3-icon-timeline-bar-chart ${activeClipClass}`}
style={{
cursor: "pointer"
cursor: "pointer",
}}
/>
</Tooltip>
@@ -67,7 +67,7 @@ function Clip(props) {
justifyContent: "flex-start",
alignItems: "flex-start",
flexDirection: "column",
padding: 10
padding: 10,
}}
>
<div>Clip all continuous values to percentile range</div>
@@ -77,7 +77,7 @@ function Clip(props) {
justifyContent: "space-between",
alignItems: "center",
paddingTop: 5,
paddingBottom: 5
paddingBottom: 5,
}}
>
<NumericInput
@@ -121,7 +121,7 @@ function Clip(props) {
style={{
cursor: "pointer",
marginRight: 5,
marginLeft: 5
marginLeft: 5,
}}
onClick={handleClipCommit}
>
@@ -7,26 +7,26 @@ import {
ButtonGroup,
AnchorButton,
Tooltip,
Position
Position,
} from "@blueprintjs/core";
import * as globals from "../../globals";
import actions from "../../actions";
import CellSetButton from "./cellSetButtons";
@connect(state => ({
@connect((state) => ({
config: state.config,
crossfilter: state.crossfilter,
differential: state.differential,
celllist1: state.differential?.celllist1,
celllist2: state.differential?.celllist2,
diffexpMayBeSlow: state.config?.parameters?.["diffexp-may-be-slow"] ?? false,
diffexpCellcountMax: state.config?.limits?.diffexp_cellcount_max
diffexpCellcountMax: state.config?.limits?.diffexp_cellcount_max,
}))
class DiffexpButtons extends React.Component {
constructor(props) {
super(props);
this.state = {
userDismissedPopover: false
userDismissedPopover: false,
};
}
@@ -46,16 +46,16 @@ class DiffexpButtons extends React.Component {
const { dispatch, differential } = this.props;
dispatch({
type: "clear differential expression",
diffExp: differential.diffExp
diffExp: differential.diffExp,
});
dispatch({
type: "clear scatterplot"
type: "clear scatterplot",
});
};
handlePopoverDismiss = () => {
this.setState({
userDismissedPopover: true
userDismissedPopover: true,
});
};
@@ -124,7 +124,7 @@ class DiffexpButtons extends React.Component {
alignItems: "flex-end",
flexDirection: "column",
padding: 10,
maxWidth: 310
maxWidth: 310,
}}
>
<p>
+10 -10
View File
@@ -7,26 +7,26 @@ import {
Radio,
RadioGroup,
Tooltip,
Position
Position,
} from "@blueprintjs/core";
import { connect } from "react-redux";
import * as globals from "../../globals";
import { World } from "../../util/stateManager";
import actions from "../../actions";
@connect(state => ({
@connect((state) => ({
universe: state.universe,
world: state.world,
layoutChoice: state.layoutChoice,
reembedController: state.reembedController,
enableReembedding: state.config?.parameters?.["enable-reembedding"] ?? false
enableReembedding: state.config?.parameters?.["enable-reembedding"] ?? false,
}))
class Embedding extends React.PureComponent {
handleLayoutChoiceChange = e => {
handleLayoutChoiceChange = (e) => {
const { dispatch } = this.props;
dispatch({
type: "set layout choice",
layoutChoice: e.currentTarget.value
layoutChoice: e.currentTarget.value,
});
};
@@ -36,7 +36,7 @@ class Embedding extends React.PureComponent {
world,
universe,
dispatch,
reembedController
reembedController,
} = this.props;
if (!enableReembedding) return null;
@@ -70,7 +70,7 @@ class Embedding extends React.PureComponent {
return (
<ButtonGroup
style={{
marginRight: 10
marginRight: 10,
}}
>
<Popover
@@ -85,7 +85,7 @@ class Embedding extends React.PureComponent {
data-testid="layout-choice"
icon="heatmap"
style={{
cursor: "pointer"
cursor: "pointer",
}}
/>
</Tooltip>
@@ -98,7 +98,7 @@ class Embedding extends React.PureComponent {
justifyContent: "flex-start",
alignItems: "flex-start",
flexDirection: "column",
padding: 10
padding: 10,
}}
>
<RadioGroup
@@ -106,7 +106,7 @@ class Embedding extends React.PureComponent {
onChange={this.handleLayoutChoiceChange}
selectedValue={layoutChoice.current}
>
{layoutChoice.available.map(name => (
{layoutChoice.available.map((name) => (
<Radio label={name} value={name} key={name} />
))}
</RadioGroup>
+19 -19
View File
@@ -11,7 +11,7 @@ import Subset from "./subset";
import UndoRedoReset from "./undoRedo";
import DiffexpButtons from "./diffexpButtons";
@connect(state => ({
@connect((state) => ({
universe: state.universe,
world: state.world,
crossfilter: state.crossfilter,
@@ -34,7 +34,7 @@ import DiffexpButtons from "./diffexpButtons";
diffexpMayBeSlow: state.config?.parameters?.["diffexp-may-be-slow"] ?? false,
showCentroidLabels: state.centroidLabels.showLabels,
tosURL: state.config?.parameters?.about_legal_tos,
privacyURL: state.config?.parameters?.about_legal_privacy
privacyURL: state.config?.parameters?.about_legal_privacy,
}))
class MenuBar extends React.Component {
static isValidDigitKeyEvent(e) {
@@ -64,7 +64,7 @@ class MenuBar extends React.Component {
constructor(props) {
super(props);
this.state = {
pendingClipPercentiles: null
pendingClipPercentiles: null,
};
}
@@ -90,7 +90,7 @@ class MenuBar extends React.Component {
return isDisabled;
};
handleClipOnKeyPress = e => {
handleClipOnKeyPress = (e) => {
/*
allow only numbers, plus other critical keys which
may be required to make a number
@@ -100,7 +100,7 @@ class MenuBar extends React.Component {
}
};
handleClipPercentileMinValueChange = v => {
handleClipPercentileMinValueChange = (v) => {
/*
Ignore anything that isn't a legit number
*/
@@ -116,11 +116,11 @@ class MenuBar extends React.Component {
if (v > 100) v = 100;
const clipPercentileMin = Math.round(v); // paranoia
this.setState({
pendingClipPercentiles: { clipPercentileMin, clipPercentileMax }
pendingClipPercentiles: { clipPercentileMin, clipPercentileMax },
});
};
handleClipPercentileMaxValueChange = v => {
handleClipPercentileMaxValueChange = (v) => {
/*
Ignore anything that isn't a legit number
*/
@@ -137,7 +137,7 @@ class MenuBar extends React.Component {
const clipPercentileMax = Math.round(v); // paranoia
this.setState({
pendingClipPercentiles: { clipPercentileMin, clipPercentileMax }
pendingClipPercentiles: { clipPercentileMin, clipPercentileMax },
});
};
@@ -149,14 +149,14 @@ class MenuBar extends React.Component {
const max = clipPercentileMax / 100;
dispatch({
type: "set clip quantiles",
clipQuantiles: { min, max }
clipQuantiles: { min, max },
});
};
handleClipOpening = () => {
const { clipPercentileMin, clipPercentileMax } = this.props;
this.setState({
pendingClipPercentiles: { clipPercentileMin, clipPercentileMax }
pendingClipPercentiles: { clipPercentileMin, clipPercentileMax },
});
};
@@ -169,7 +169,7 @@ class MenuBar extends React.Component {
dispatch({
type: "show centroid labels for category",
showLabels: !showCentroidLabels
showLabels: !showCentroidLabels,
});
};
@@ -200,7 +200,7 @@ class MenuBar extends React.Component {
aboutLink,
showCentroidLabels,
privacyURL,
tosURL
tosURL,
} = this.props;
const { pendingClipPercentiles } = this.state;
@@ -221,10 +221,10 @@ class MenuBar extends React.Component {
position: "fixed",
right: globals.leftSidebarWidth + 8,
top: 8,
display: "flex"
display: "flex",
}}
>
{disableDiffexp ? null : <DiffexpButtons/>}
{disableDiffexp ? null : <DiffexpButtons />}
<Subset
subsetPossible={this.subsetPossible()}
subsetResetPossible={this.subsetResetPossible()}
@@ -251,11 +251,11 @@ class MenuBar extends React.Component {
onClick={() => {
dispatch({
type: "change graph interaction mode",
data: "select"
data: "select",
});
}}
style={{
cursor: "pointer"
cursor: "pointer",
}}
/>
</Tooltip>
@@ -272,11 +272,11 @@ class MenuBar extends React.Component {
onClick={() => {
dispatch({
type: "change graph interaction mode",
data: "zoom"
data: "zoom",
});
}}
style={{
cursor: "pointer"
cursor: "pointer",
}}
/>
</Tooltip>
@@ -294,7 +294,7 @@ class MenuBar extends React.Component {
active={showCentroidLabels}
intent={showCentroidLabels ? "primary" : "none"}
style={{
marginRight: 10
marginRight: 10,
}}
/>
</Tooltip>
+11 -11
View File
@@ -47,16 +47,16 @@ function InformationMenu(props) {
}`}
/>
<MenuItem text="MIT License" />
{tosURL ? <MenuItem
href={tosURL}
target="_blank"
text="Terms of Service"
/> : null }
{privacyURL ? <MenuItem
href={privacyURL}
target="_blank"
text="Privacy Policy"
/> : null }
{tosURL ? (
<MenuItem href={tosURL} target="_blank" text="Terms of Service" />
) : null}
{privacyURL ? (
<MenuItem
href={privacyURL}
target="_blank"
text="Privacy Policy"
/>
) : null}
</Menu>
}
position={Position.BOTTOM_RIGHT}
@@ -65,7 +65,7 @@ function InformationMenu(props) {
type="button"
className="bp3-button bp3-icon-info-sign"
style={{
cursor: "pointer"
cursor: "pointer",
}}
/>
</Popover>
+1 -1
View File
@@ -7,7 +7,7 @@ function Subset(props) {
subsetPossible,
subsetResetPossible,
handleSubset,
handleSubsetReset
handleSubsetReset,
} = props;
return (
+3 -7
View File
@@ -4,11 +4,7 @@ import { AnchorButton, Tooltip } from "@blueprintjs/core";
import { tooltipHoverOpenDelay } from "../../globals";
function InformationMenu(props) {
const {
undoDisabled,
redoDisabled,
dispatch
} = props;
const { undoDisabled, redoDisabled, dispatch } = props;
return (
<div style={{ marginRight: 10 }} className="bp3-button-group">
<Tooltip
@@ -24,7 +20,7 @@ function InformationMenu(props) {
dispatch({ type: "@@undoable/undo" });
}}
style={{
cursor: "pointer"
cursor: "pointer",
}}
data-testid="undo"
/>
@@ -42,7 +38,7 @@ function InformationMenu(props) {
dispatch({ type: "@@undoable/redo" });
}}
style={{
cursor: "pointer"
cursor: "pointer",
}}
data-testid="redo"
/>