Skip to content

Commit

Permalink
AG-1425 refactor to support last pinned cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sagely1 committed May 7, 2024
1 parent c6e8c81 commit 45ffc4c
Show file tree
Hide file tree
Showing 3 changed files with 289 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,27 @@ <h1 class="gct-heading h2">Gene Comparison Tool</h1>
class="table-divider table-divider-1"
>
<div class="table-divider-inner">
<div id="pinned-genes-header">Pinned Genes ({{ pinnedGenes.length }}/50)</div>
<div id="pinned-genes-header">
<span *ngIf="category === 'RNA - Differential Expression'">
Pinned Genes ({{ pinnedGenes.length }}/50)
</span>
<div *ngIf="category === 'Protein - Differential Expression'">
<div>
Pinned Genes ({{ uniquePinnedGenesCount }}/50)&nbsp;&nbsp;&nbsp;
</div>
<div id="pinned-proteins">
{{ pinnedGenes.length }} Proteins
</div>
</div>
</div>
<div class="csv-download-button">
<button (click)="downloadPinnedCsv()">
<svg-icon name="download" customClass="two-tone"></svg-icon
>Download as CSV
</button>
</div>
<div class="clear-all-button">
<button (click)="clearPinnedGenes()">Clear All</button>
<button (click)="onClearAllClick()">Clear All</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -330,7 +342,7 @@ <h1 class="gct-heading h2">Gene Comparison Tool</h1>
</div>
<div>
<button
(click)="unpinGene(gene)"
(click)="onUnPinGeneClick(gene)"
pTooltip="Unpin this gene"
tooltipPosition="top"
tooltipStyleClass="tooltip"
Expand Down Expand Up @@ -392,15 +404,15 @@ <h1 class="gct-heading h2">Gene Comparison Tool</h1>
<button
class="pin-all-button"
[ngClass]="{
disabled: pinnedGenes.length >= maxPinnedGenes
disabled: getPinDisabledStatus()
}"
(click)="pinFilteredGenes()"
(click)="onPinAllClick()"
[pTooltip]="
pinnedGenes.length >= maxPinnedGenes
? 'You have already pinned the maximum number of genes (' +
getPinDisabledStatus()
? 'You have already pinned the maximum number of Ensembl identifiers (' +
maxPinnedGenes +
'). You must unpin some genes before you can pin more.'
: 'Add all matching genes to Pinned list'
: 'Pin all matching rows to the top.'
"
tooltipPosition="top"
tooltipStyleClass="tooltip"
Expand Down Expand Up @@ -458,16 +470,16 @@ <h1 class="gct-heading h2">Gene Comparison Tool</h1>
</div>
<div>
<button
(click)="pinGene(gene)"
(click)="onPinGeneClick(gene)"
[ngClass]="{
disabled: pinnedGenes.length >= maxPinnedGenes
disabled: getPinDisabledStatus()
}"
[pTooltip]="
pinnedGenes.length >= maxPinnedGenes
? 'You have already pinned the maximum number of genes (' +
getPinDisabledStatus()
? 'You have already pinned the maximum number of Ensembl identifiers (' +
maxPinnedGenes +
'). You must unpin some genes before you can pin more.'
: 'Pin this gene to the top of the list'
: 'Pin this row to the top of the list'
"
tooltipPosition="top"
tooltipStyleClass="tooltip"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,12 @@
flex-grow: 1;
}
}

#pinned-proteins {
font-weight: normal;
padding: 5px 0;
font-size: 14px;
}
}

button {
Expand Down
Loading

0 comments on commit 45ffc4c

Please sign in to comment.