diff --git a/cli/build.js b/cli/build.js index 33a930b45..1d5c58df3 100644 --- a/cli/build.js +++ b/cli/build.js @@ -41,13 +41,13 @@ const run = (args) => { console.log(stats.toString({colors: true})); } else { if (stats.hasWarnings()) { - utils.warn("Webpack has warnings (run with '--verbose' to see them)"); + utils.warn("Webpack has warnings (run with '--verbose' to see them)"); } if (global.AUSPICE_VERBOSE) { - console.log(stats.toString({colors: true})); + console.log(stats.toString({colors: true})); } if (customOutputPath) { - utils.exportIndexDotHtml({relative: args.serverless}); + utils.exportIndexDotHtml({relative: args.serverless}); } } }); diff --git a/cli/server/parseNarrative.js b/cli/server/parseNarrative.js index 0745bf0ef..7e749152a 100644 --- a/cli/server/parseNarrative.js +++ b/cli/server/parseNarrative.js @@ -29,13 +29,13 @@ const makeFrontMatterBlock = (frontMatter) => { utils.warn(`Narrative parsing -- can't do author arrays yet`); } else if (typeof frontMatter.authors === 'string') { if (frontMatter.authorLinks && typeof frontMatter.authorLinks === "string") { - markdown.push(`### Author: [${frontMatter.authors}](${frontMatter.authorLinks})`); + markdown.push(`### Author: [${frontMatter.authors}](${frontMatter.authorLinks})`); } else { - markdown.push(`### Author: ${frontMatter.authors}`); + markdown.push(`### Author: ${frontMatter.authors}`); } if (frontMatter.affiliations && typeof frontMatter.affiliations === "string") { - markdown[markdown.length-1] += " 1 "; - markdown.push(` 1 ${frontMatter.affiliations}`); + markdown[markdown.length-1] += " 1 "; + markdown.push(` 1 ${frontMatter.affiliations}`); } } } diff --git a/docs-src/website/sidebars.json b/docs-src/website/sidebars.json index e7cb1403f..55b9b374d 100644 --- a/docs-src/website/sidebars.json +++ b/docs-src/website/sidebars.json @@ -8,20 +8,20 @@ "Customisations": [ "customisations/introduction", { - "type": "subcategory", - "label": "Customising the Client", - "ids": [ - "customisations/client/componentInterfaces", - "customisations/client/sidebarTheme" - ] + "type": "subcategory", + "label": "Customising the Client", + "ids": [ + "customisations/client/componentInterfaces", + "customisations/client/sidebarTheme" + ] }, { - "type": "subcategory", - "label": "Customising the Server", - "ids": [ - "customisations/server/charonAPI", - "customisations/server/serverless" - ] + "type": "subcategory", + "label": "Customising the Server", + "ids": [ + "customisations/server/charonAPI", + "customisations/server/serverless" + ] }, "customisations/authentication" ], diff --git a/src/components/controls/choose-branch-labelling.js b/src/components/controls/choose-branch-labelling.js index 2ede36649..f0ed72aeb 100644 --- a/src/components/controls/choose-branch-labelling.js +++ b/src/components/controls/choose-branch-labelling.js @@ -17,19 +17,19 @@ class ChooseBranchLabelling extends React.Component { render() { return (
- - Branch Labels - -
- ({value: x, label: x}))} + clearable={false} + searchable={false} + multi={false} + onChange={this.change} + /> +
); } diff --git a/src/components/controls/choose-dataset-select.js b/src/components/controls/choose-dataset-select.js index 33b849def..73f274530 100644 --- a/src/components/controls/choose-dataset-select.js +++ b/src/components/controls/choose-dataset-select.js @@ -39,7 +39,7 @@ class ChooseDatasetSelect extends React.Component { clearable={false} searchable={false} multi={false} - onChange={(opt) => {this.changeDataset(this.createDataPath(opt.value));}} + onChange={(opt) => {this.changeDataset(this.createDataPath(opt.value));}} /> ); diff --git a/src/components/controls/choose-dataset.js b/src/components/controls/choose-dataset.js index 296b3e5f4..8added3ed 100644 --- a/src/components/controls/choose-dataset.js +++ b/src/components/controls/choose-dataset.js @@ -52,9 +52,9 @@ class ChooseDataset extends React.Component { if (!this.props.available || !this.props.available.datasets) { /* TODO expose this to the extension API */ if (this.props.source === "github") { - return (); + return (); } else if (this.props.source === "dropped") { - return (); + return (); } return (); } @@ -65,7 +65,7 @@ class ChooseDataset extends React.Component { .split("/"); displayedDataset.forEach((part, idx) => { if (part.includes(":")) { - displayedDataset[idx] = part.split(":")[0]; + displayedDataset[idx] = part.split(":")[0]; } }); @@ -74,7 +74,7 @@ class ChooseDataset extends React.Component { this.props.available.datasets.forEach((d) => { const firstField = d.request.split("/")[0]; if (!options[0].includes(firstField)) { - options[0].push(firstField); + options[0].push(firstField); } }); @@ -83,12 +83,12 @@ class ChooseDataset extends React.Component { in order to create available alternatives for each field */ options[idx] = []; this.props.available.datasets.forEach((singleAvailableOption) => { - /* if the parents (and their parents etc) of this choice match, - then we add that as a valid option */ - const fields = singleAvailableOption.request.split("/"); - if (checkEqualityOfArrays(fields, displayedDataset, idx) && options[idx].indexOf(fields[idx]) === -1) { - options[idx].push(fields[idx]); - } + /* if the parents (and their parents etc) of this choice match, + then we add that as a valid option */ + const fields = singleAvailableOption.request.split("/"); + if (checkEqualityOfArrays(fields, displayedDataset, idx) && options[idx].indexOf(fields[idx]) === -1) { + options[idx].push(fields[idx]); + } }); } @@ -99,8 +99,8 @@ class ChooseDataset extends React.Component { diff --git a/src/components/controls/choose-second-tree.js b/src/components/controls/choose-second-tree.js index d9e250863..a24c85868 100644 --- a/src/components/controls/choose-second-tree.js +++ b/src/components/controls/choose-second-tree.js @@ -25,7 +25,7 @@ class ChooseSecondTree extends React.Component { .split("/"); displayedDataset.forEach((part, idx) => { if (part.includes(":")) { - displayedDataset[idx] = part.split(":")[0]; + displayedDataset[idx] = part.split(":")[0]; } }); const idxOfTree = displayedDataset.indexOf(this.props.treeName); @@ -33,17 +33,17 @@ class ChooseSecondTree extends React.Component { const matches = this.props.available.datasets .map((datasetObj) => datasetObj.request.split("/")) .filter((dataset) => { - if (dataset.length !== displayedDataset.length) return false; - for (let i=0; i m[idxOfTree]); @@ -51,11 +51,11 @@ class ChooseSecondTree extends React.Component { return (
- - Second Tree - -
- - - Animation Speed - + + Animation Speed + - - Slow - - - Medium - - - Fast - + + Slow + + + Medium + + + Fast + -
+
- { - this.props.dispatch({ type: CHANGE_ANIMATION_LOOP, data: !this.props.mapAnimationShouldLoop }); - }} - label="Loop animation" - /> -
- { - analyticsControlsEvent("change-animation-cumulative"); - this.props.dispatch({ type: CHANGE_ANIMATION_CUMULATIVE, data: !this.props.mapAnimationCumulative }); - }} - label="Animate cumulative history" - /> + { + this.props.dispatch({ type: CHANGE_ANIMATION_LOOP, data: !this.props.mapAnimationShouldLoop }); + }} + label="Loop animation" + /> +
+ { + analyticsControlsEvent("change-animation-cumulative"); + this.props.dispatch({ type: CHANGE_ANIMATION_CUMULATIVE, data: !this.props.mapAnimationCumulative }); + }} + label="Animate cumulative history" + />
); diff --git a/src/components/controls/search.js b/src/components/controls/search.js index e967a6ae5..9fc36a0de 100644 --- a/src/components/controls/search.js +++ b/src/components/controls/search.js @@ -112,10 +112,10 @@ class SearchStrains extends React.Component { render() { return ( - Search Strains - - {this.ref = r;}} onFocus={() => this.updateVisibleStrains()}/> - + Search Strains + + {this.ref = r;}} onFocus={() => this.updateVisibleStrains()}/> + ); diff --git a/src/components/main/index.js b/src/components/main/index.js index ac041fd9e..a4596613e 100644 --- a/src/components/main/index.js +++ b/src/components/main/index.js @@ -65,37 +65,37 @@ class Main extends React.Component { const {big, chart} = calcPanelDims(this.props.panelLayout === "grid", this.props.panelsToDisplay, this.props.displayNarrative, availableWidth, availableHeight); return ( - - - {this.setState({sidebarOpen: !this.state.sidebarOpen});}} - /> - {this.setState({sidebarOpen: !this.state.sidebarOpen});}} - /> - - {this.props.narrativeIsLoaded ? renderNarrativeToggle(this.props.dispatch, this.props.displayNarrative) : null} - {this.props.displayNarrative ? null : } - {this.props.panelsToDisplay.includes("tree") ? : null} - {this.props.panelsToDisplay.includes("map") ? : null} - {this.props.panelsToDisplay.includes("entropy") ? : null} - {this.props.panelsToDisplay.includes("frequencies") && this.props.frequenciesLoaded ? : null} - {this.props.displayNarrative ? null :