Skip to content

Commit 5f15330

Browse files
authored
Merge pull request #237 from CBIIT/dev-1.3.0
Pull from Dev 1.3.0
2 parents 7814296 + ac093f1 commit 5f15330

File tree

6 files changed

+90
-4
lines changed

6 files changed

+90
-4
lines changed

src/components/Accordion/Accordion.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,5 @@
7676

7777
.accordion-body {
7878
padding: 0;
79+
font-weight: bold;
7980
}

src/components/common/NavBar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ const NavBar = () => {
414414
<MobileLiSection style={path === "/about" || path.startsWith("/about?") ? mobileActiveStyle : null}><NavLink to="/about" onClick={handleMobileMenuClick}>About CCDI Data Catalog</NavLink></MobileLiSection>
415415
<MobileLiSection style={path === "/glossary" || path.startsWith("/glossary?") ? mobileActiveStyle : null}><NavLink to="/glossary" onClick={handleMobileMenuClick}>Glossary</NavLink></MobileLiSection>
416416
<MobileLiSection style={path === "/siteupdate" || path.startsWith("/siteupdate?") ? mobileActiveStyle : null}><NavLink to="/siteupdate" onClick={handleMobileMenuClick}>Site Updates</NavLink></MobileLiSection>
417-
<MobileLiSection><a href="/User Guide for CCDC v1.2.2.pdf">User Guide (PDF)</a></MobileLiSection>
417+
<MobileLiSection><a href="/User Guide for CCDC v1.3.0.pdf">User Guide (PDF)</a></MobileLiSection>
418418
</MobileSubUl>
419419
</MobileUlContainer>
420420
<UlContainer id="primary-navigation" className="primary-navigation">
@@ -430,7 +430,7 @@ const NavBar = () => {
430430
<li><NavLink to="/about" style={({ isActive }) => (isActive ? activeStyle : null)}>&nbsp; &nbsp; About CCDI Data Catalog</NavLink></li>
431431
<li><NavLink to="/glossary" style={({ isActive }) => (isActive ? activeStyle : null)}>&nbsp; &nbsp; Glossary</NavLink></li>
432432
<li><NavLink to="/siteupdate" style={({ isActive }) => (isActive ? activeStyle : null)}>&nbsp; &nbsp; Site Updates</NavLink></li>
433-
<li><a href="/User Guide for CCDC v1.2.2.pdf" target="_blank" rel="noreferrer">&nbsp; &nbsp; User Guide (PDF)</a></li>
433+
<li><a href="/User Guide for CCDC v1.3.0.pdf" target="_blank" rel="noreferrer">&nbsp; &nbsp; User Guide (PDF)</a></li>
434434
</ul>
435435
</LiSection>
436436
</UlContainer>

src/index.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ nav {
3636
}
3737

3838
.custom-popover.popover {
39-
max-width: 220px;
4039
border-radius: 6px;
4140
font-size: 12px;
41+
word-wrap: normal;
42+
z-index: 99;
4243
}
44+
45+
.popover-body {
46+
padding: 10px;
47+
}

src/pages/participatingResourceDetailPage/ParticipatingResourceDetail.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ const ParticipatingResourceDetail = ({
221221
const tooltips = {
222222
Repository: "Biomedical data repositories store, organize, validate, archive, preserve, and distribute data, in compliance with the FAIR Data Principles. It is a system for storing multiple research artifacts, provided at least some of the research artifacts contain Individual Research Data. A data repository often contains artifacts from multiple studies. Some data repositories accept research datasets irrespective of the structure of those datasets; other data repositories require all research datasets to conform to a standard reference model.",
223223
Catalog: "A data catalog is not a data repository but rather a place where data is described with an index to what is available. A collection of digests and references (e.g., URL or POC) to corresponding research artifacts. There is a consistent structure across the collection of digests to facilitate filtering and identifying research artifacts of interest. A catalog contains some combination of Summary Research Data, Summary Clinical Data, Data Overview, and Resource Metadata.",
224+
"Cell Line": "A cell culture developed from a single cell or group of similar cells and therefore consisting of cells with a uniform genetic makeup that can be reproduced for various types of research. A cell line is different than a tissue sample in that it is grown as a culture of identical cells and can be reproduced indefinitely.",
224225
Collection: "A group of datasets collected together for any reason by an organization of researchers, stewards, or stakeholders either pertaining to a common theme or for a common purpose. For example, the Treehouse Childhood Cancer Initiative maintains a collection of cell line data as part of their repository of pediatric cancer genomic data.",
225226
Knowledgebase: "Biomedical knowledgebases extract, accumulate, organize, annotate, and link the growing body of information that is related to and relies on core datasets.",
226227
Registry: "A cancer registry is an information system designed for the collection, storage, and management of data on persons with cancer. An inventory of individuals or samples, usually focused on a specific diagnosis or condition. In some cases, public health laws require collecting information in registries about individuals who have a specific disease or condition. In other cases, individuals provide information about themselves to these registries voluntarily. Thus, a registry contains Individual Clinical Data, but not Individual Research Data.",

src/pages/searchCatalogPage/SearchResult/SearchResult.js

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,17 @@ const SearchResultContainer = styled.div`
167167
color: #004187;
168168
}
169169
170+
.descLink {
171+
margin: 0 3px 0 3px;
172+
padding: 1px 5px 1px 5px;
173+
border: 1px solid #9EC1DB;
174+
border-radius: 5px;
175+
font-weight: bold;
176+
background-color: #DFEEF9;
177+
color: #004187;
178+
line-height: 2.5em;
179+
}
180+
170181
a[target="_blank"] {
171182
color: #004187;
172183
background: url(${externalIcon}) right center no-repeat #DFEEF9;
@@ -597,6 +608,43 @@ const SearchResult = ({
597608
} else {
598609
desc = desc.replace(/<(?![b/])/g, "&lt;");
599610
}
611+
const arr = desc.split("http");
612+
let descArr = [];
613+
if (arr.length > 1) {
614+
if (arr[0].endsWith("<b>")) {
615+
descArr.push(arr[0].substring(0, arr[0].length - 3));
616+
} else {
617+
descArr.push(arr[0]);
618+
}
619+
for (let i = 1; i < arr.length; i += 1) {
620+
const urlArr = arr[i].split(" ");
621+
const url = urlArr[0].replace("</b>", "");
622+
const urlLastChar = url[url.length - 1];
623+
if (",;.()<>{}".includes(urlLastChar)) {
624+
const newUrl = "http".concat(url.substring(0, url.length - 1));
625+
descArr.push(newUrl);
626+
const restText = arr[i].split(url.substring(0, url.length - 1))[1];
627+
if (restText.endsWith("<b>")) {
628+
descArr.push(restText.substring(0, restText.length - 3));
629+
} else {
630+
descArr.push(restText);
631+
}
632+
} else {
633+
const newUrl = "http".concat(url);
634+
descArr.push(newUrl);
635+
if (urlArr.length !== 1) {
636+
const restText = arr[i].split(url)[1];
637+
if (restText.endsWith("<b>")) {
638+
descArr.push(restText.substring(0, restText.length - 3));
639+
} else {
640+
descArr.push(restText);
641+
}
642+
}
643+
}
644+
}
645+
} else {
646+
descArr = arr;
647+
}
600648
const otherMatches = [];
601649
if (rst.highlight) {
602650
Object.keys(rst.highlight).forEach((hl) => {
@@ -725,7 +773,20 @@ const SearchResult = ({
725773
<div className="col">
726774
<label>Description:</label>
727775
<span className="textSpan">
728-
{ReactHtmlParser(desc)}
776+
{
777+
descArr.map((item, desidx) => {
778+
const deskey = `des_${desidx}`;
779+
return (
780+
item.includes("http")
781+
? (
782+
<span key={deskey} className="descLink">
783+
<a href={item} target="_blank" rel="noreferrer noopener">{item}</a>
784+
</span>
785+
)
786+
: <span key={deskey}>{ReactHtmlParser(item)}</span>
787+
);
788+
})
789+
}
729790
</span>
730791
</div>
731792
</div>
@@ -844,6 +905,24 @@ const SearchResult = ({
844905
</span>
845906
);
846907
}
908+
if (am.name === "GEO Study Identifier") {
909+
const geoId = m.replace(/<b>/g, "").replace(/<\/b>/g, "");
910+
const geoLink = ''.concat('https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=', geoId);
911+
return (
912+
<span className="itemSpan">
913+
<a href={geoLink} target="_blank" rel="noreferrer noopener">{geoId}</a>
914+
</span>
915+
);
916+
}
917+
if (am.name === "dbGaP Study Identifier") {
918+
const dbId = m.replace(/<b>/g, "").replace(/<\/b>/g, "");
919+
const dbLink = ''.concat('https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=', dbId);
920+
return (
921+
<span className="itemSpan">
922+
<a href={dbLink} target="_blank" rel="noreferrer noopener">{dbId}</a>
923+
</span>
924+
);
925+
}
847926
return (
848927
<span className="itemSpan additionalItemSpan">{ReactHtmlParser(m)}</span>
849928
);

0 commit comments

Comments
 (0)