Skip to content

Commit f909cc0

Browse files
frano-mNoopDog
authored andcommitted
Add project/organ release manifest download modal. Update modal table UI. #1047. (#1081)
1 parent 4e71cca commit f909cc0

File tree

5 files changed

+57
-28
lines changed

5 files changed

+57
-28
lines changed

spa/src/app/files/releases/release-files-modal/release-files-modal.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ <h4 class="fontsize-l">
2020
<mat-table [dataSource]="state.releaseDataset.files">
2121
<ng-container matColumnDef="download">
2222
<mat-cell *matCellDef="let element" class="download fontsize-xxs">
23-
<a [href]="getReleaseFileUrl(element.url)"></a> {{element.extension}}
23+
<a [href]="getReleaseFileUrl(element.url)"></a>
24+
<span>{{element.extension}}</span>
2425
</mat-cell>
2526
</ng-container>
2627
<ng-container matColumnDef="description">

spa/src/app/files/releases/release-files-modal/release-files-modal.component.scss

Lines changed: 53 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ h4 span {
1212
text-transform: capitalize;
1313
}
1414

15+
/* Cell class "fontsize-..." */
1516
/* Warning - content */
16-
warning-content .fontsize-xs {
17-
margin: 0;
17+
/* mat-cell */
18+
warning-content .fontsize-xs, mat-table mat-cell, mat-table mat-cell.fontsize-xxs {
19+
margin: 0; /* Overrides class "fontsize-..." margin */
1820
}
1921

2022
/* Table */
@@ -23,6 +25,9 @@ mat-table {
2325
/* Cell row */
2426
mat-row {
2527
border-bottom: 1px solid $hca-gray-lightest;
28+
flex-wrap: wrap;
29+
min-height: 32px;
30+
padding: 8px 0;
2631
}
2732

2833
mat-row:first-child {
@@ -32,38 +37,61 @@ mat-table {
3237
/* Cell */
3338
mat-cell {
3439
color: $hca-black;
35-
min-width: 152px;
36-
overflow: visible;
40+
flex: 1;
3741
padding: 0 12px;
3842
}
3943

40-
/* Cell class "fontsize-..." */
41-
mat-cell, mat-cell.fontsize-xxs {
42-
margin: 0; /* Overrides class "fontsize-..." margin */
43-
}
44-
44+
/* Download */
4545
.download {
46-
min-width: unset;
46+
min-width: 60px; /* Required to maintain column alignments */
47+
48+
/* Icon */
49+
> a {
50+
background: url("assets/images/icon/hca-download-primary.png") center no-repeat;
51+
background-size: contain;
52+
cursor: pointer;
53+
flex: none;
54+
height: 16px;
55+
margin-bottom: 4px; /* Required to bottom align icon with file download text */
56+
width: 16px;
57+
}
58+
59+
/* File text */
60+
> span {
61+
margin-left: 8px;
62+
}
4763
}
48-
64+
65+
/* Description */
66+
.description {
67+
flex-basis: 100%;
68+
}
69+
70+
/* Copy to clipboard */
4971
.copy-to-clipboard {
5072
min-width: 72px; /* Copy Link and Link Copied */
5173
}
52-
53-
.description {
54-
flex-basis: 70%;
55-
}
5674
}
5775

76+
/**
77+
* Small Tablet +
78+
* https://material.io/design/layout/responsive-layout-grid.html#breakpoints
79+
*/
80+
@media screen and (min-width: 600px) {
81+
82+
/* Table */
83+
mat-table {
5884

59-
.download > a {
60-
align-self: center;
61-
background: url("assets/images/icon/hca-download-primary.png") center no-repeat;
62-
background-size: contain;
63-
cursor: pointer;
64-
display: flex;
65-
justify-content: center;
66-
height: 16px;
67-
margin-right: 4px;
68-
width: 16px;
85+
/* Cell row */
86+
mat-row {
87+
flex-wrap: nowrap;
88+
min-height: 40px;
89+
padding: 4px 0;
90+
}
91+
92+
/* Description */
93+
.description {
94+
flex-basis: 70%;
95+
}
96+
}
6997
}

spa/src/app/files/releases/release-table/release-table.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292

9393
/* Wrapper around table */
9494
> div {
95-
min-width: 930px; /* Required for horizontal scroll */
95+
min-width: 1056px; /* Required for horizontal scroll - 6 columns at min width 152px + 24px padding */
9696
}
9797
}
9898
}

spa/src/app/modal/modal-layout/modal-layout.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<div *ngIf="loaded" [@fadeIn]>
22
<span class="close" (click)="onCloseClicked()"></span>
3-
<ng-content select="[overline]"></ng-content>
43
<h2 class="fontsize-xl"><ng-content select="[title]"></ng-content></h2>
54
<status-panel>
65
<hca-section-title>

spa/src/app/modal/modal-layout/modal-layout.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ hca-section-title {
5656
* Subtitle
5757
*/
5858
h2 {
59+
margin-right: 32px; /* Prevents close icon from overlapping on smaller screens */
5960
margin-top: 0;
6061
max-width: 550px;
6162
}

0 commit comments

Comments
 (0)