Skip to content

Commit 670b2d8

Browse files
authored
Merge pull request #74 from JaneliaSciComp/open_external_links_in_new_tab
feat: All links to external sources now open in a new tab.
2 parents 40b4bc7 + 8cf9ae5 commit 670b2d8

12 files changed

Lines changed: 139 additions & 115 deletions

‎src/components/About.jsx‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React from "react";
22
import { Typography, Row, Col } from "antd";
33
import { Link } from "react-router-dom";
4+
import { faExternalLink } from "@fortawesome/pro-regular-svg-icons";
5+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
46
import References from "./References";
57
import config from "../config";
68

@@ -16,8 +18,8 @@ export default function About() {
1618
quick to look up by identifier. You can also upload your own data and match it against these public data sets.
1719
</Paragraph>
1820
<Paragraph>
19-
More information about the software infrastructure is available in our <a href="https://doi.org/10.1186/s12859-024-05732-7">published paper</a> and {" "}
20-
<a href="https://aws.amazon.com/blogs/architecture/scaling-neuroscience-research-on-aws/">AWS blog post</a>.
21+
More information about the software infrastructure is available in our <a href="https://doi.org/10.1186/s12859-024-05732-7" target="_blank" rel="noopener noreferrer">published paper <FontAwesomeIcon icon={faExternalLink} size="xs" /></a> and {" "}
22+
<a href="https://aws.amazon.com/blogs/architecture/scaling-neuroscience-research-on-aws/" target="_blank" rel="noopener noreferrer">AWS blog post <FontAwesomeIcon icon={faExternalLink} size="xs" /></a>.
2123
</Paragraph>
2224

2325
<Row gutter={20}>
@@ -69,7 +71,7 @@ export default function About() {
6971
<ul>
7072
<li><Link to="/usage">Usage Terms</Link></li>
7173
<li><Link to="/upload-policy">Uploaded Data Usage and Retention Policy</Link></li>
72-
<li><a href="https://www.hhmi.org/privacy-policy">HHMI Privacy Policy</a></li>
74+
<li><a href="https://www.hhmi.org/privacy-policy" target="_blank" rel="noopener noreferrer">HHMI Privacy Policy <FontAwesomeIcon icon={faExternalLink} size="xs" /></a></li>
7375
</ul>
7476

7577
<Title level={2}>Release Notes</Title>
@@ -86,13 +88,13 @@ export default function About() {
8688
<Title level={2}>Site Feedback Survey</Title>
8789
<Paragraph>
8890
Please take a moment to fill out our{" "}
89-
<a href="https://forms.gle/tJa6GAwEjs7fykhG7">site feedback survey</a>.
91+
<a href="https://forms.gle/tJa6GAwEjs7fykhG7" target="_blank" rel="noopener noreferrer">site feedback survey <FontAwesomeIcon icon={faExternalLink} size="xs" /></a>.
9092
</Paragraph>
9193

9294
<Title level={2}>Source Code</Title>
9395
<Paragraph>
9496
You can find all of the code for this website and the supporting infrastructure in our{" "}
95-
<a href="https://github.com/JaneliaSciComp/neuronbridge">GitHub repositories</a>.
97+
<a href="https://github.com/JaneliaSciComp/neuronbridge" target="_blank" rel="noopener noreferrer">GitHub repositories <FontAwesomeIcon icon={faExternalLink} size="xs" /></a>.
9698
</Paragraph>
9799

98100
</Col>

‎src/components/Admin.jsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React, { useState, useEffect, useContext } from "react";
22
import { Auth } from "aws-amplify";
33
import { Switch } from "antd";
4+
import { faExternalLink } from "@fortawesome/pro-regular-svg-icons";
5+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
46
import { AppContext } from "../containers/AppContext";
57
import AnnouncementsCreate from "./AnnouncementsCreate";
68

@@ -34,8 +36,8 @@ export default function Admin() {
3436
return (
3537
<>
3638
<h2>Admin Page</h2>
37-
<a href="https://janelia-neuronbridge-admin-prod.s3.amazonaws.com/index.html">
38-
Custom search admin site
39+
<a href="https://janelia-neuronbridge-admin-prod.s3.amazonaws.com/index.html" target="_blank" rel="noopener noreferrer">
40+
Custom search admin site <FontAwesomeIcon icon={faExternalLink} size="xs" />
3941
</a>
4042
<p>Bearer token:</p>
4143
<textarea

‎src/components/DevSiteBanner.jsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import "./DevSiteBanner.css";
22
import { useContext } from "react";
33
import { Switch } from "antd";
4+
import { faExternalLink } from "@fortawesome/pro-regular-svg-icons";
5+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
46
import { AppContext } from "../containers/AppContext";
57

68
export default function DevSiteBanner() {
@@ -14,7 +16,7 @@ export default function DevSiteBanner() {
1416
<div className="devsite-banner">
1517
<p>
1618
This is the development server. For the public release, please go to{" "}
17-
<a href="https://neuronbridge.janelia.org">prod</a> | {" "}
19+
<a href="https://neuronbridge.janelia.org" target="_blank" rel="noopener noreferrer">prod <FontAwesomeIcon icon={faExternalLink} size="xs" /></a> | {" "}
1820
{ appState.isAdmin ? (
1921
<Switch
2022
checked={appState.debug}

‎src/components/ExternalLink.jsx‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const vfbUrl = "http://virtualflybrain.org/xref/neuronbridge/<NAME>";
1616

1717
function VFBLink({ name }) {
1818
return (
19-
<a href={vfbUrl.replace(/<NAME>/, name)}>
19+
<a href={vfbUrl.replace(/<NAME>/, name)} target="_blank" rel="noopener noreferrer">
2020
Virtual Fly Brain{" "}
2121
<FontAwesomeIcon icon={faExternalLink} size="xs" transform="up-2" />
2222
</a>
@@ -35,6 +35,8 @@ function FlyWireLink({ tag }) {
3535
href={flyWireUrl
3636
.replace(/<ID>/, id)
3737
.replace(/<VERSION>/, version.replace(/^v/, ""))}
38+
target="_blank"
39+
rel="noopener noreferrer"
3840
>
3941
FlyWire{" "}
4042
<FontAwesomeIcon icon={faExternalLink} size="xs" transform="up-2" />
@@ -61,7 +63,7 @@ export default function ExternalLink({ id, isLM, library, publishedName }) {
6163

6264
return (
6365
<>
64-
<a href={extUrl.replace(/<NAME>/, id)}>
66+
<a href={extUrl.replace(/<NAME>/, id)} target="_blank" rel="noopener noreferrer">
6567
{extName}{" "}
6668
<FontAwesomeIcon icon={faExternalLink} size="xs" transform="up-2" />
6769
</a>
@@ -137,7 +139,7 @@ export default function ExternalLink({ id, isLM, library, publishedName }) {
137139
<>
138140
{ !library.match(/flywire_fafb/i) ? (
139141
<>
140-
<a href={finalEMUrl}>
142+
<a href={finalEMUrl} target="_blank" rel="noopener noreferrer">
141143
NeuPrint{" "}
142144
<FontAwesomeIcon icon={faExternalLink} size="xs" transform="up-2" />
143145
</a><br /></>) : ""}

‎src/components/Help/HelpContents.jsx‎

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import React, { useContext, useEffect, useRef } from "react";
22
import { useLocation, useHistory, Link } from "react-router-dom";
33
import PropTypes from "prop-types";
44
import { Typography, InputNumber, Col, Row, Divider } from "antd";
5+
import { faExternalLink } from "@fortawesome/pro-regular-svg-icons";
6+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
57
import SearchInput from "../SearchInput";
68
import { AppContext } from "../../containers/AppContext";
79
import { useQuery } from "../../libs/hooksLib";
@@ -179,7 +181,7 @@ export default function HelpContents({ scroll }) {
179181
Raw light microscopy (LM) data collected by FlyLight is
180182
transformed in several ways prior to matching using color depth
181183
MIP search (
182-
<a href="https://doi.org/10.1101/318006">Otsuna et al., 2018</a>).
184+
<a href="https://doi.org/10.1101/318006" target="_blank" rel="noopener noreferrer">Otsuna et al., 2018 <FontAwesomeIcon icon={faExternalLink} size="xs" /></a>).
183185
To improve matches for denser MCFO data, the color depth MIP
184186
approach was extended in several ways (Otsuna, et al., in
185187
preparation). The data generation pipeline for LM images is shown
@@ -188,8 +190,8 @@ export default function HelpContents({ scroll }) {
188190
<p>
189191
After images are aligned to a common template, we used direction
190192
selective local thresholding (DSLT;{" "}
191-
<a href="https://doi.org/10.1111/tpj.12738">
192-
Kawase, et al., 2015
193+
<a href="https://doi.org/10.1111/tpj.12738" target="_blank" rel="noopener noreferrer">
194+
Kawase, et al., 2015 <FontAwesomeIcon icon={faExternalLink} size="xs" />
193195
</a>
194196
) to generate a 3D segmentation and create a separate color depth
195197
MIP for each fully connected component. These segmented MIPs were
@@ -204,8 +206,8 @@ export default function HelpContents({ scroll }) {
204206
</p>
205207
<p>
206208
More details are available in the {" "}
207-
<a href="https://doi.org/10.1186/s12859-024-05732-7">
208-
NeuronBridge paper
209+
<a href="https://doi.org/10.1186/s12859-024-05732-7" target="_blank" rel="noopener noreferrer">
210+
NeuronBridge paper <FontAwesomeIcon icon={faExternalLink} size="xs" />
209211
</a>
210212
.
211213
</p>
@@ -224,8 +226,8 @@ export default function HelpContents({ scroll }) {
224226
<p>
225227
The EM data sets were imaged and reconstructed by the FlyEM
226228
Project (
227-
<a href="https://doi.org/10.7554/eLife.57443">
228-
Scheffer, et al., 2020
229+
<a href="https://doi.org/10.7554/eLife.57443" target="_blank" rel="noopener noreferrer">
230+
Scheffer, et al., 2020 <FontAwesomeIcon icon={faExternalLink} size="xs" />
229231
</a>
230232
). After the imagery was registered to the JRC2018 template, we
231233
downloaded the reconstructed skeletons as SWC files and
@@ -336,8 +338,8 @@ export default function HelpContents({ scroll }) {
336338
automatically registered to a standard color depth search alignment
337339
template. Currently, these are JRC2018_Unisex_20x_HR (Brain) and
338340
JRC2018_VNC_Unisex_40x_DS (VNC) both of which are derived from the{" "}
339-
<a href="https://www.janelia.org/open-science/jrc-2018-brain-templates">
340-
JRC 2018 templates
341+
<a href="https://www.janelia.org/open-science/jrc-2018-brain-templates" target="_blank" rel="noopener noreferrer">
342+
JRC 2018 templates <FontAwesomeIcon icon={faExternalLink} size="xs" />
341343
</a>
342344
.
343345
<h3 className="top-space-sm">Supported File Formats</h3>
@@ -351,8 +353,8 @@ export default function HelpContents({ scroll }) {
351353
The aligner provides an alignment score and a link to a verification movie.
352354
The verification movie allows you to visualize the aligned stack against the template.
353355
The alignment score is calculated as a{" "}
354-
<a href="https://martin-thoma.com/zero-mean-normalized-cross-correlation">
355-
Zero Mean Normalized Cross-Correlation (ZNCC)
356+
<a href="https://martin-thoma.com/zero-mean-normalized-cross-correlation" target="_blank" rel="noopener noreferrer">
357+
Zero Mean Normalized Cross-Correlation (ZNCC) <FontAwesomeIcon icon={faExternalLink} size="xs" />
356358
</a>
357359
.
358360
This yields a number between -1 and 1, where higher scores are better.
@@ -424,8 +426,8 @@ export default function HelpContents({ scroll }) {
424426
This is unrecoverable in our system. You will need to use an
425427
alternative method to register your data. Once you have an aligned
426428
image stack, use the{" "}
427-
<a href="https://github.com/JaneliaSciComp/ColorMIP_Mask_Search">
428-
Color MIP Mask Search Fiji plugin
429+
<a href="https://github.com/JaneliaSciComp/ColorMIP_Mask_Search" target="_blank" rel="noopener noreferrer">
430+
Color MIP Mask Search Fiji plugin <FontAwesomeIcon icon={faExternalLink} size="xs" />
429431
</a>{" "}
430432
to generate the aligned color depth MIPs and upload those for custom
431433
searching.

‎src/components/HelpPage.jsx‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from "react";
22
import { Typography, Row, Col, Divider } from "antd";
3+
import { faExternalLink } from "@fortawesome/pro-regular-svg-icons";
4+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
35
import ScrollToTopOnMount from "./ScrollToTopOnMount";
46
import HelpContents from "./Help/HelpContents";
57
import "./HelpPage.css";
@@ -50,8 +52,8 @@ export default function HelpPage() {
5052
<Title level={3}>Downloading the data</Title>
5153
<p>
5254
You can download the{" "}
53-
<a href="https://www.janelia.org/open-science/color-depth-mip">
54-
Color-Depth MIPs
55+
<a href="https://www.janelia.org/open-science/color-depth-mip" target="_blank" rel="noopener noreferrer">
56+
Color-Depth MIPs <FontAwesomeIcon icon={faExternalLink} size="xs" />
5557
</a>{" "}
5658
for your own research.
5759
</p>
@@ -61,23 +63,23 @@ export default function HelpPage() {
6163
<Title level={3}>Programmatic API access</Title>
6264
<p>
6365
Access the images programmatically{" "}
64-
<a href="https://open.quiltdata.com/b/janelia-flylight-color-depth/tree/README.md">
65-
using the S3 API
66+
<a href="https://open.quiltdata.com/b/janelia-flylight-color-depth/tree/README.md" target="_blank" rel="noopener noreferrer">
67+
using the S3 API <FontAwesomeIcon icon={faExternalLink} size="xs" />
6668
</a>{" "}
6769
on AWS Open Data.
6870

6971
The matches are also available on S3, in a{" "}
70-
<a href="https://open.quiltdata.com/b/janelia-neuronbridge-data-prod/tree/">different bucket</a>.
72+
<a href="https://open.quiltdata.com/b/janelia-neuronbridge-data-prod/tree/" target="_blank" rel="noopener noreferrer">different bucket <FontAwesomeIcon icon={faExternalLink} size="xs" /></a>.
7173
</p>
7274
<p>
73-
You can also use <a href="https://github.com/JaneliaSciComp/neuronbridge-python">Python API</a> to access the matches and images using Python.
75+
You can also use <a href="https://github.com/JaneliaSciComp/neuronbridge-python" target="_blank" rel="noopener noreferrer">Python API <FontAwesomeIcon icon={faExternalLink} size="xs" /></a> to access the matches and images using Python.
7476
</p>
7577

7678
<Divider />
7779
<a className="anchorOffset" id="tools" href="#tools">#tools</a>
7880
<Title level={3}>Third-party tools</Title>
7981
<Typography>
80-
<a href="http://natverse.org/neuronbridger/">neuronbridger</a> - R
82+
<a href="http://natverse.org/neuronbridger/" target="_blank" rel="noopener noreferrer">neuronbridger <FontAwesomeIcon icon={faExternalLink} size="xs" /></a> - R
8183
library for interacting with the NeuronBridge.
8284
</Typography>
8385
</Col>

‎src/components/ImageCollections.jsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React, { useContext, useEffect, useState } from "react";
22
import { Typography, Table, message } from "antd";
33
import { Auth, Storage } from "aws-amplify";
4+
import { faExternalLink } from "@fortawesome/pro-regular-svg-icons";
5+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
46
import { AppContext } from "../containers/AppContext";
57
import { libraryFormatter } from "../libs/utils";
68

@@ -168,7 +170,7 @@ export default function ImageCollections() {
168170
const { id, refName } = doi;
169171
return (
170172
<span key={id}>
171-
<a href={`https://doi.org/${id}`}>{refName}</a>
173+
<a href={`https://doi.org/${id}`} target="_blank" rel="noopener noreferrer">{refName} <FontAwesomeIcon icon={faExternalLink} size="xs" /></a>
172174
{index < doisList.length - 1 ? ', ' : ''}
173175
</span>
174176
);

‎src/components/Landing.jsx‎

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import React from "react";
33
import PropTypes from "prop-types";
44
import { Link } from "react-router-dom";
55
import { Typography, Col, Row } from "antd";
6+
import { faExternalLink } from "@fortawesome/pro-regular-svg-icons";
7+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
68
import SearchInput from "./SearchInput";
79
import { isInternalSite } from "../libs/utils";
810
import "./Landing.css";
@@ -41,13 +43,13 @@ function Landing(props) {
4143
<Paragraph>
4244
Search light and electron microscopy data sets of the Drosophila
4345
nervous system provided by the{" "}
44-
<a href="https://www.janelia.org/project-team/flylight">
45-
FlyLight
46+
<a href="https://www.janelia.org/project-team/flylight" target="_blank" rel="noopener noreferrer">
47+
FlyLight <FontAwesomeIcon icon={faExternalLink} size="xs" />
4648
</a>{" "}
47-
and <a href="https://www.janelia.org/project-team/flyem">FlyEM</a>{" "}
49+
and <a href="https://www.janelia.org/project-team/flyem" target="_blank" rel="noopener noreferrer">FlyEM <FontAwesomeIcon icon={faExternalLink} size="xs" /></a>{" "}
4850
projects at{" "}
49-
<a href="https://www.janelia.org">Janelia Research Campus</a>, as well
50-
as other public connectomic data sets.
51+
<a href="https://www.janelia.org" target="_blank" rel="noopener noreferrer">Janelia Research Campus <FontAwesomeIcon icon={faExternalLink} size="xs" /></a>, as well
52+
as other public connectomic data sets.
5153
You can find similar neurons based on shape regardless of data set.
5254
</Paragraph>
5355

@@ -67,16 +69,16 @@ function Landing(props) {
6769
<Row className="collections">
6870
<Col span={12}>
6971
<b>Light Microscopy</b><br/>
70-
<a href="http://gen1mcfo.janelia.org/cgi-bin/gen1mcfo.cgi">FlyLight Generation 1 MCFO</a><br/>
71-
<a href="http://splitgal4.janelia.org">FlyLight Split-GAL4</a><br/>
72-
<a href="https://flylight-raw.janelia.org/cgi-bin/raw.cgi">FlyLight Split-GAL4 Omnibus Broad</a><br/>
72+
<a href="http://gen1mcfo.janelia.org/cgi-bin/gen1mcfo.cgi" target="_blank" rel="noopener noreferrer">FlyLight Generation 1 MCFO <FontAwesomeIcon icon={faExternalLink} size="xs" /></a><br/>
73+
<a href="http://splitgal4.janelia.org" target="_blank" rel="noopener noreferrer">FlyLight Split-GAL4 <FontAwesomeIcon icon={faExternalLink} size="xs" /></a><br/>
74+
<a href="https://flylight-raw.janelia.org/cgi-bin/raw.cgi" target="_blank" rel="noopener noreferrer">FlyLight Split-GAL4 Omnibus Broad <FontAwesomeIcon icon={faExternalLink} size="xs" /></a><br/>
7375
</Col>
7476
<Col span={12}>
7577
<b>Electron Microscopy</b><br/>
76-
<a href="https://neuprint.janelia.org/?dataset=male-cns:v0.9&qt=findneurons"> FlyEM Male CNS</a><br/>
77-
<a href="https://neuprint.janelia.org/?dataset=hemibrain%3Av1.2.1&qt=findneurons">FlyEM Hemibrain</a><br/>
78-
<a href="https://neuprint.janelia.org/?dataset=manc%3Av1.0&qt=findneurons">FlyEM MANC</a><br/>
79-
<a href="https://codex.flywire.ai">FlyWire Brain</a><br/>
78+
<a href="https://neuprint.janelia.org/?dataset=male-cns:v0.9&qt=findneurons" target="_blank" rel="noopener noreferrer"> FlyEM Male CNS <FontAwesomeIcon icon={faExternalLink} size="xs" /></a><br/>
79+
<a href="https://neuprint.janelia.org/?dataset=hemibrain%3Av1.2.1&qt=findneurons" target="_blank" rel="noopener noreferrer">FlyEM Hemibrain <FontAwesomeIcon icon={faExternalLink} size="xs" /></a><br/>
80+
<a href="https://neuprint.janelia.org/?dataset=manc%3Av1.0&qt=findneurons" target="_blank" rel="noopener noreferrer">FlyEM MANC <FontAwesomeIcon icon={faExternalLink} size="xs" /></a><br/>
81+
<a href="https://codex.flywire.ai" target="_blank" rel="noopener noreferrer">FlyWire Brain <FontAwesomeIcon icon={faExternalLink} size="xs" /></a><br/>
8082
</Col>
8183
</Row>
8284

@@ -85,7 +87,7 @@ function Landing(props) {
8587
search algorithms across image collections. You can also
8688
upload your own image to run a custom Color Depth MIP search (see About
8789
page). For NBLAST searching, try{" "}
88-
<a href="https://www.virtualflybrain.org">Virtual Fly Brain</a>.
90+
<a href="https://www.virtualflybrain.org" target="_blank" rel="noopener noreferrer">Virtual Fly Brain <FontAwesomeIcon icon={faExternalLink} size="xs" /></a>.
8991
</Paragraph>
9092

9193
<Paragraph>

0 commit comments

Comments
 (0)