Skip to content

Commit 23b6feb

Browse files
Fran McDadeFran McDade
authored andcommitted
Make the 'project_supplementary_links' field available on the project overview page. Resolves #848.
1 parent 2204b90 commit 23b6feb

15 files changed

+706
-74
lines changed

spa/src/app/files/files.module.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ import { ProjectDownloadMatrixComponent } from "./project-download-matrix/projec
8181
import { ProjectGuardComponent } from "./project-guard/project-guard.component";
8282
import { ProjectIntegrationsComponent } from "./project-integrations/project-integrations.component";
8383
import { ProjectIngestInProgressComponent } from "./project-ingest-in-progress/project-ingest-in-progress.component";
84+
import { ProjectSupplementaryLinksComponent } from "./project-supplementary-links/project-supplementary-links.component";
8485
import { ProjectTSVDownloadComponent } from "./project-tsv-download/project-tsv-download.component";
8586
import { SearchTermService } from "./shared/search-term.service";
8687
import { DownloadService } from "./shared/download.service";
@@ -144,13 +145,14 @@ import { TableScroll } from "./table-scroll/table-scroll.component";
144145
MatrixUrlRequestFormComponent,
145146
MatrixUrlRequestCompletedComponent,
146147
ProjectDeprecatedComponent,
148+
ProjectDownloadMatrixComponent,
149+
ProjectDownloadMatrixModalComponent,
150+
ProjectDownloadMatrixModalContainerComponent,
147151
ProjectGuardComponent,
148152
ProjectIngestInProgressComponent,
149153
ProjectIntegrationsComponent,
154+
ProjectSupplementaryLinksComponent,
150155
ProjectTSVDownloadComponent,
151-
ProjectDownloadMatrixComponent,
152-
ProjectDownloadMatrixModalComponent,
153-
ProjectDownloadMatrixModalContainerComponent,
154156
HCAGetDataComponent,
155157
HCAGetDataDownloadsComponent,
156158
HCAGetDataPanelComponent,

spa/src/app/files/hca-project/hca-project-mapper.mock.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export const PROJECT_DETAIL_SINGLE_VALUES = {
5252
"rawCount": 199640,
5353
"sampleEntityType": "cellLines",
5454
"selectedCellType": "arcuate artery endothelial cell",
55+
"supplementaryLinks": ["ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE109nnn/GSE109774/suppl/GSE109774_RAW.tar"],
5556
"totalCells": 53755,
5657
"totalCount": 199640,
5758
"workflow": "optimus_v1.3.1"
@@ -112,6 +113,7 @@ export const PROJECT_DETAIL_MULTIPLE_VALUES = {
112113
"rawCount": 199640,
113114
"sampleEntityType": "cellLines, specimens",
114115
"selectedCellType": "arcuate artery endothelial cell, stromal cell",
116+
"supplementaryLinks": ["https://github.com/czbiohub/tabula-muris", "ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE109nnn/GSE109774/suppl/GSE109774_Liver.tar.gz"],
115117
"totalCells": 53755,
116118
"totalCount": 199640,
117119
"workflow": "optimus_v1.3.1, optimus_v1.3.2"
@@ -147,6 +149,7 @@ export const PROJECT_DETAIL_EMPTY_VALUES = {
147149
"rawCount": "",
148150
"sampleEntityType": "",
149151
"selectedCellType": "",
152+
"supplementaryLinks": [],
150153
"totalCells": "",
151154
"totalCount": "",
152155
"workflow": ""
@@ -196,6 +199,7 @@ export const PROJECT_DETAIL_UNSPECIFIED_VALUES = {
196199
"rawCount": "Unspecified",
197200
"sampleEntityType": "Unspecified",
198201
"selectedCellType": "Unspecified",
202+
"supplementaryLinks": ["Unspecified"],
199203
"totalCells": "Unspecified",
200204
"totalCount": "Unspecified",
201205
"workflow": "Unspecified"
@@ -231,6 +235,7 @@ export const PROJECT_DETAIL_NULL_VALUES = {
231235
"rawCount": null,
232236
"sampleEntityType": null,
233237
"selectedCellType": null,
238+
"supplementaryLinks": null,
234239
"totalCells": null,
235240
"totalCount": null,
236241
"workflow": null
@@ -240,6 +245,7 @@ export const PROJECT_DETAIL_NULL_VALUES = {
240245
// sample entity type as "specimens",
241246
// workflow as "Unspecified"
242247
// projectShortname as sentence case e.g. "Healthy and type 2 diabetes pancreas"
248+
// supplementaryLinks with link ending in "/", and invalid link
243249
export const PROJECT_DETAIL_SPECIFIC_VALUES = {
244250
"ageUnit": "month",
245251
"arrayExpressAccessions": "E-AAAA-00",
@@ -282,6 +288,7 @@ export const PROJECT_DETAIL_SPECIFIC_VALUES = {
282288
"rawCount": 199640,
283289
"sampleEntityType": "specimens",
284290
"selectedCellType": "arcuate artery endothelial cell",
291+
"supplementaryLinks": ["ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE109nnn/GSE109774/suppl/GSE109774_RAW.tar/", "GSE109774_Liver.tar.gz"],
285292
"totalCells": 53755,
286293
"totalCount": 199640,
287294
"workflow": "optimus_v1.3.1"

spa/src/app/files/hca-project/hca-project.component.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h2 class="fontsize-xl">{{state.project.project.projectTitle}}</h2>
1717
<div>
1818
<div class="project-description">
1919
<h4 class="fontsize-m semi-bold">Description</h4>
20-
<p class="fontsize-s">{{state.project.project.projectDescription}}</p>
20+
<p class="description fontsize-s">{{state.project.project.projectDescription}}</p>
2121
<div class="stretch">
2222
<h4 class="fontsize-m semi-bold">Contact</h4>
2323
<ng-container [ngSwitch]="isAnyContactAssociated(state.project.contacts)">
@@ -296,6 +296,18 @@ <h4 class="fontsize-m semi-bold">Project Details</h4>
296296
<p class="fontsize-xs rhs">{{state.project.project.donorCount | countSize}}</p>
297297
</div>
298298
</div>
299+
<div class="project-supplementary">
300+
<h4 class="fontsize-m semi-bold">Supplementary Links</h4>
301+
<ng-container [ngSwitch]="isSupplementaryLinks(state.project.project.supplementaryLinks)">
302+
<project-supplementary-links
303+
*ngSwitchCase="true"
304+
[supplementaryLinks]="state.project.project.supplementaryLinks">
305+
</project-supplementary-links>
306+
<p class="fontsize-xs"
307+
*ngSwitchDefault>There are currently no supplementary links for this project at this
308+
time.</p>
309+
</ng-container>
310+
</div>
299311
</div>
300312
<div>
301313
<div class="project-counts">

spa/src/app/files/hca-project/hca-project.component.scss

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@
2323
margin-bottom: 36px;
2424
}
2525

26-
/* Project title */
26+
/* First column, second column, and inner containers */
27+
.project-overview > div, .project-overview > div:last-of-type > div {
28+
min-width: 0; /* Required to maintain flex with equal proportions, where flex child is an ellipsis (supplementary links) */
29+
}
30+
31+
/* Project title */
2732
h2 {
2833
margin: 0;
2934
max-width: 500px;
@@ -147,6 +152,11 @@
147152
display: flex;
148153
flex-wrap: wrap;
149154

155+
/* Text to describe project */
156+
.description {
157+
max-width: 650px; /* Required for tablet */
158+
}
159+
150160
> div {
151161

152162
/* Contacts, publications */
@@ -198,7 +208,7 @@
198208
}
199209

200210
/* Project downloads, details, accessions, data release policy etc. */
201-
.project-details, .project-downloads, .project-counts, .project-integrations,
211+
.project-details, .project-downloads, .project-counts, .project-integrations, .project-supplementary,
202212
.project-views, .project-workflows, .project-accessions, .data-release-policy {
203213

204214
/* Row - excludes last row in each group */
@@ -288,8 +298,8 @@
288298
}
289299

290300
/* Project downloads, details, accessions etc. */
291-
.project-details, .project-accessions, .project-downloads, .project-counts, .project-views, .project-workflows, .data-release-policy {
292-
301+
.project-details, .project-accessions, .project-downloads, .project-supplementary,
302+
.project-counts, .project-views, .project-workflows, .data-release-policy {
293303
/* Row */
294304
> div {
295305
flex-direction: row;
@@ -416,7 +426,7 @@
416426
}
417427
}
418428

419-
/* First column */
429+
/* First column, second column inner containers */
420430
.project-overview > div:first-of-type, .project-overview > div:last-of-type > div {
421431
max-width: 650px;
422432
}

0 commit comments

Comments
 (0)