Skip to content

Commit dd9bc3a

Browse files
frano-mMillenniumFalconMechanic
authored andcommitted
Remove 'May be 1' text from sample and project tab hovers for the cell count estimate column. Resolves #997. (#1021)
1 parent e5f921d commit dd9bc3a

File tree

8 files changed

+19
-8
lines changed

8 files changed

+19
-8
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ <h4 class="fontsize-m semi-bold">Project Details</h4>
278278
<div>
279279
<p class="fontsize-xs semi-bold lhs">
280280
<hca-tooltip [tooltipClass]="'hca-tooltip narrow'"
281-
[tooltipContent]="getColumnDescription('totalCells')"
281+
[tooltipContent]="getColumnDescription('totalCells','Projects')"
282282
[tooltipDisabled]="false"
283283
[tooltipPosition]="'above'">{{getColumnDisplayName('totalCells')}}
284284
</hca-tooltip>

spa/src/app/files/hca-table-column-header-title/hca-table-column-header-title.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</ng-template>
1818
<ng-template #headerTitle>
1919
<hca-tooltip
20-
[tooltipContent]="getColumnDescription(columnName)"
20+
[tooltipContent]="getColumnDescription(columnName, entityName)"
2121
[tooltipDisabled]="getColumnDescription(columnName) === null"
2222
[tooltipPosition]="'above'"
2323
[tooltipClass]="'hca-tooltip narrow'"

spa/src/app/files/hca-table-column-header-title/hca-table-column-header-title.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export class HCATableColumnHeaderTitleComponent {
2121

2222
// Inputs
2323
@Input() columnName: string;
24+
@Input() entityName: string;
2425

2526
// Template variables
2627
public getColumnDescription = getColumnDescription;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
<ng-container matColumnDef="totalCells">
273273
<mat-header-cell *matHeaderCellDef [ngClass]="getColumnClass('totalCells')" [ngStyle]="getColumnStyle('totalCells')">
274274
<hca-table-column-header>
275-
<hca-table-column-header-title columnTitle [columnName]="'totalCells'">{{getColumnDisplayName('totalCells')}}
275+
<hca-table-column-header-title columnTitle [columnName]="'totalCells'" [entityName]="'Files'">{{getColumnDisplayName('totalCells')}}
276276
</hca-table-column-header-title>
277277
<hca-table-column-header-count columnSubTitle [columnName]="'totalCells'" [domainCountsByColumnName]="domainCountsByColumnName$ | async" [summaryCount]="(selectFileSummary$ | async).totalCellCount | countSize"></hca-table-column-header-count>
278278
</hca-table-column-header>

spa/src/app/files/hca-table-projects/hca-table-projects.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
<mat-header-cell *matHeaderCellDef [ngClass]="getColumnClass('totalCells')"
237237
[ngStyle]="getColumnStyle('totalCells')">
238238
<hca-table-column-header>
239-
<hca-table-column-header-title columnTitle [columnName]="'totalCells'">
239+
<hca-table-column-header-title columnTitle [columnName]="'totalCells'" [entityName]="'Projects'">
240240
{{getColumnDisplayName('totalCells')}}
241241
</hca-table-column-header-title>
242242
<hca-table-column-header-count columnSubTitle [columnName]="'totalCells'"

spa/src/app/files/hca-table-samples/hca-table-samples.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
<ng-container matColumnDef="totalCells">
224224
<mat-header-cell *matHeaderCellDef [ngClass]="getColumnClass('totalCells')" [ngStyle]="getColumnStyle('totalCells')">
225225
<hca-table-column-header>
226-
<hca-table-column-header-title columnTitle [columnName]="'totalCells'">{{getColumnDisplayName('totalCells')}}
226+
<hca-table-column-header-title columnTitle [columnName]="'totalCells'" [entityName]="'Samples'">{{getColumnDisplayName('totalCells')}}
227227
</hca-table-column-header-title>
228228
<hca-table-column-header-count columnSubTitle [columnName]="'totalCells'" [domainCountsByColumnName]="domainCountsByColumnName$ | async" [summaryCount]="(selectFileSummary$ | async).totalCellCount | countSize"></hca-table-column-header-count>
229229
</hca-table-column-header>

spa/src/app/files/table/table-column.model.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export interface TableColumn {
1919
columnTitleWidth?: number;
2020
countType: CountType;
2121
description?: string;
22+
descriptionFiles?: string;
23+
descriptionProjects?: string;
24+
descriptionSamples?: string;
2225
userFriendly: string;
2326
}
2427

spa/src/app/files/table/table-methods.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ let tableColumns: TableColumn[] = [
225225
key: "totalCells",
226226
userFriendly: "Cell Count Estimate",
227227
description: "Total estimated number of cells in biomaterial. May be 1 for well-based assays.",
228+
descriptionFiles: "Total estimated number of cells in biomaterial. May be 1 for well-based assays.",
229+
descriptionProjects: "Total estimated number of cells in biomaterial.",
230+
descriptionSamples: "Total estimated number of cells in biomaterial.",
228231
alignment: ColumnAlignment.RIGHT,
229232
columnSort: true,
230233
columnSortKey: "cellCount",
@@ -307,14 +310,18 @@ export function getColumnCountType(column: string): string {
307310
/**
308311
* Returns the column description.
309312
* Used by table header tooltip.
313+
* EntityName used to distinguish different descriptions between table views (project, sample, file).
310314
*
311315
* @param {string} column
316+
* @param {string} entityName
312317
* @returns {string}
313318
*/
314-
export function getColumnDescription(column: string): string {
319+
export function getColumnDescription(column: string, entityName: string = ""): string {
315320

316-
return tableColumn.get(column).description ?
317-
`${tableColumn.get(column).userFriendly}: ${tableColumn.get(column).description}` : `${tableColumn.get(column).userFriendly}.`;
321+
const description = `description${entityName}`;
322+
323+
return tableColumn.get(column)[description] ?
324+
`${tableColumn.get(column).userFriendly}: ${tableColumn.get(column)[description]}` : `${tableColumn.get(column).userFriendly}.`;
318325
}
319326

320327
/**

0 commit comments

Comments
 (0)