Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated evidence, assertion tag status styles #579

Merged
merged 3 commits into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
</ng-container>

<ng-template #tag>
<nz-tag *ngIf="enablePopover; else noPopover"
<nz-tag [ngClass]="{ rejected: assertion.status === 'REJECTED', submitted: assertion.status === 'SUBMITTED', accepted: assertion.status === 'ACCEPTED' }"
nz-popover
[nzPopoverMouseEnterDelay]="0.5"
[nzPopoverContent]="assertionPopover"
nzPopoverPlacement="right"
nzPopoverTrigger="hover"
[nzColor]="assertion.status | colorNameForStatus">
[nzPopoverTrigger]="enablePopover ? 'hover' : null">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>

Expand All @@ -20,16 +19,15 @@
</ng-template>
</ng-template>

<ng-template #noPopover>
<nz-tag [nzColor]="assertion.status | colorNameForStatus">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>
</ng-template>

<ng-template #unlinked>
<ng-template [ngTemplateOutlet]="tag"></ng-template>
</ng-template>

<ng-template #tagContent>
<i nz-icon nzType="civic-assertion" nzTheme="twotone" nzTwotoneColor="#7243B5"></i> {{ assertion.name }}
<i nz-icon
nzType="civic-assertion"
nzTheme="twotone"
[nzTwotoneColor]="assertion.status === 'REJECTED' ? '#BBB' : '#7243B5'">
</i>
{{ assertion.name }}
</ng-template>
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'themes/overrides/entity-tag-overrides.less';

:host {
display: inline-block;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
</ng-container>

<ng-template #tag>
<nz-tag *ngIf="enablePopover; else noPopover"
<nz-tag
nz-popover
[nzPopoverMouseEnterDelay]="0.5"
[nzPopoverContent]="clinicalTrialPopover"
nzPopoverPlacement="right"
nzPopoverTrigger="hover">
[nzPopoverTrigger]="enablePopover ? 'hover' : null">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>

Expand All @@ -19,12 +19,6 @@
</ng-template>
</ng-template>

<ng-template #noPopover>
<nz-tag>
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>
</ng-template>

<ng-template #unlinked>
<ng-template [ngTemplateOutlet]="tag"></ng-template>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
</a>

<ng-template #tag>
<nz-tag *ngIf="enablePopover; else noPopover"
<nz-tag
nz-popover
[nzPopoverMouseEnterDelay]="0.5"
[nzPopoverContent]="commentPopover"
nzPopoverPlacement="right"
nzPopoverTrigger="hover">
[nzPopoverTrigger]="enablePopover ? 'hover' : null">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
</ng-container>

<ng-template #tag>
<nz-tag *ngIf="enablePopover; else noPopover"
nz-popover
<nz-tag nz-popover
[nzPopoverMouseEnterDelay]="this.onCloseClicked ? 0 : 0.5"
[nzPopoverContent]="diseasePopover"
nzPopoverPlacement="right"
nzPopoverTrigger="hover"
[nzMode]="this.onCloseClicked ? 'closeable' : 'default'" (nzOnClose)="itemClosed($event)"
>
[nzPopoverTrigger]="enablePopover ? 'hover' : null"
[nzMode]="this.onCloseClicked ? 'closeable' : 'default'"
(nzOnClose)="itemClosed($event)">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>

Expand All @@ -21,18 +20,15 @@
</ng-template>
</ng-template>

<ng-template #noPopover>
<nz-tag [nzMode]="this.onCloseClicked ? 'closeable' : 'default'" (nzOnClose)="itemClosed($event)">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>
</ng-template>

<ng-template #unlinked>
<ng-template [ngTemplateOutlet]="tag"></ng-template>
</ng-template>

<ng-template #tagContent>
<i nz-icon nzType="civic-disease" nzTheme="twotone" nzTwotoneColor="#E62F76"></i>
<i nz-icon
nzType="civic-disease"
nzTheme="twotone"
nzTwotoneColor="#E62F76"></i>
<ng-container *ngIf="truncateLongName; else fullName">
{{ disease.name | truncate: 27 }}
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
</ng-container>

<ng-template #tag>
<nz-tag *ngIf="enablePopover; else noPopover"
<nz-tag
nz-popover
[nzPopoverMouseEnterDelay]="this.onCloseClicked ? 0 : 0.5"
[nzPopoverContent]="drugPopover"
nzPopoverPlacement="right"
nzPopoverTrigger="hover"
[nzPopoverTrigger]="enablePopover ? 'hover' : null"
[nzMode]="this.onCloseClicked ? 'closeable' : 'default'" (nzOnClose)="itemClosed($event)">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>
Expand All @@ -20,12 +20,6 @@
</ng-template>
</ng-template>

<ng-template #noPopover>
<nz-tag [nzMode]="this.onCloseClicked ? 'closeable' : 'default'" (nzOnClose)="itemClosed($event)">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>
</ng-template>

<ng-template #unlinked>
<ng-template [ngTemplateOutlet]="tag"></ng-template>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
</ng-container>

<ng-template #tag>
<nz-tag *ngIf="enablePopover; else noPopover" nz-popover
<nz-tag [ngClass]="{ rejected: evidence.status === 'REJECTED', submitted: evidence.status === 'SUBMITTED', accepted: evidence.status === 'ACCEPTED' }"
nz-popover
[nzPopoverMouseEnterDelay]="0.5"
[nzPopoverContent]="evidencePopover"
nzPopoverPlacement="right"
nzPopoverTrigger="hover"
[nzColor]="evidence.status | colorNameForStatus">
[nzPopoverTrigger]="enablePopover ? 'hover' : null">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>
<ng-template #evidencePopover>
Expand All @@ -19,12 +19,6 @@
</ng-template>
</ng-template>

<ng-template #noPopover>
<nz-tag [nzColor]="evidence.status | colorNameForStatus">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>
</ng-template>

<ng-template #unlinked>
<ng-template [ngTemplateOutlet]="tag"></ng-template>
</ng-template>
Expand All @@ -33,5 +27,7 @@
<i nz-icon
nzType="civic-evidence"
nzTheme="twotone"
nzTwotoneColor="#F68F37"></i> {{ evidence.name }}
[nzTwotoneColor]="evidence.status === 'REJECTED' ? '#BBB' : '#F68F37'">
</i>
{{ evidence.name }}
</ng-template>
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'themes/overrides/entity-tag-overrides.less';

:host {
display: inline-block;
}
12 changes: 3 additions & 9 deletions client/src/app/components/flags/flag-tag/flag-tag.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
</a>

<ng-template #tag>
<nz-tag *ngIf="enablePopover; else noPopover"
<nz-tag
nz-popover
[nzPopoverMouseEnterDelay]="0.5"
[nzPopoverContent]="flagPopover"
nzPopoverPlacement="right"
nzPopoverTrigger="hover">
[nzPopoverTrigger]="enablePopover ? 'hover' : null">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>

Expand All @@ -17,13 +17,7 @@
</ng-template>
</ng-template>

<ng-template #noPopover>
<nz-tag>
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>
</ng-template>

<ng-template #tagContent>
<i nz-icon nzType="civic-flag" nzTheme="twotone" nzTwotoneColor="#E24759"></i>
{{ flag.name }}
</ng-template>
</ng-template>
11 changes: 2 additions & 9 deletions client/src/app/components/genes/gene-tag/gene-tag.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
</ng-container>

<ng-template #tag>
<nz-tag *ngIf="enablePopover; else noPopover"
<nz-tag
nz-popover
[nzPopoverMouseEnterDelay]="this.onCloseClicked ? 0 : 0.5"
[nzPopoverContent]="genePopover"
nzPopoverTrigger="hover"
[nzPopoverTrigger]="enablePopover ? 'hover' : null"
[nzMode]="this.onCloseClicked ? 'closeable' : 'default'"
(nzOnClose)="itemClosed($event)">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
Expand All @@ -19,13 +19,6 @@
</ng-template>
</ng-template>

<ng-template #noPopover>
<nz-tag [nzMode]="this.onCloseClicked ? 'closeable' : 'default'"
(nzOnClose)="itemClosed($event)">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>
</ng-template>

<ng-template #unlinked>
<ng-template [ngTemplateOutlet]="tag"></ng-template>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,23 @@
</ng-container>

<ng-template #tag>
<nz-tag *ngIf="enablePopover; else noPopover"
nz-popover
<nz-tag nz-popover
[nzPopoverContent]="orgPopover">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>
<ng-template #orgPopover>
<cvc-organization-popover *ngIf="enablePopover" [orgId]="org.id"></cvc-organization-popover>
<cvc-organization-popover *ngIf="enablePopover"
[orgId]="org.id"></cvc-organization-popover>
</ng-template>
</ng-template>

<ng-template #noPopover>
<nz-tag>
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>
</ng-template>

<ng-template #unlinked>
<ng-template [ngTemplateOutlet]="tag"></ng-template>
</ng-template>

<ng-template #tagContent>
<i nz-icon
nzType="civic-organization" nzTheme="twotone" nzTwotoneColor="#58A0C4"></i> {{ org.name }}
nzType="civic-organization"
nzTheme="twotone"
nzTwotoneColor="#58A0C4"></i> {{ org.name }}
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
</ng-container>

<ng-template #tag>
<nz-tag *ngIf="enablePopover; else noPopover"
<nz-tag
nz-popover
[nzPopoverMouseEnterDelay]="this.onCloseClicked ? 0 : 0.5"
[nzPopoverContent]="phenotypePopover"
nzPopoverPlacement="right"
nzPopoverTrigger="hover"
[nzPopoverTrigger]="enablePopover ? 'hover' : null"
[nzMode]="this.onCloseClicked ? 'closeable' : 'default'" (nzOnClose)="itemClosed($event)"
>
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
</a>

<ng-template #tag>
<nz-tag *ngIf="enablePopover; else noPopover"
<nz-tag
nz-popover
[nzPopoverMouseEnterDelay]="0.5"
[nzPopoverContent]="revisionPopover"
nzPopoverPlacement="right"
nzPopoverTrigger="hover">
[nzPopoverTrigger]="enablePopover ? 'hover' : null">
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>

Expand All @@ -17,13 +17,7 @@
</ng-template>
</ng-template>

<ng-template #noPopover>
<nz-tag>
<ng-template [ngTemplateOutlet]="tagContent"></ng-template>
</nz-tag>
</ng-template>

<ng-template #tagContent>
<i nz-icon nzType="civic-revision" nzTheme="twotone" nzTwotoneColor="#F0673A"></i>
{{ revision.name }}
</ng-template>
</ng-template>
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
<ng-container *ngIf="sortedContributors && sortedContributors.length > 0; else noContributors">
<a *ngFor="let u of sortedContributors" routerLink="/users/{{u.user.id}}" class="avatar">
<nz-avatar [nzSize]="14" nz-popover [nzPopoverMouseEnterDelay]="0.5" [nzPopoverContent]="curatorPopover"
nzPopoverTrigger="hover" nzPopoverPlacement="bottomRight" nzIcon="user" [nzSrc]="u.user.profileImagePath"
<a *ngFor="let u of sortedContributors"
routerLink="/users/{{u.user.id}}"
class="avatar">
<nz-avatar [nzSize]="14"
nz-popover
[nzPopoverMouseEnterDelay]="0.5"
[nzPopoverContent]="curatorPopover"
nzPopoverTrigger="hover"
nzPopoverPlacement="bottomRight"
nzIcon="user"
[nzSrc]="u.user.profileImagePath"
nzSize="small"></nz-avatar>
<ng-template #curatorPopover>
<cvc-user-popover [userId]="u.user.id">
<ng-template #additionalMetadata>
<nz-descriptions nzBordered nzTitle="Activity" nzSize="small" [nzColumn]="1">
<nz-descriptions nzBordered
nzTitle="Activity"
nzSize="small"
[nzColumn]="1">
<nz-descriptions-item nzTitle="Contributions">
<ng-container *ngFor="let a of u.uniqueActions; last as isLast">
{{a.action | eventVerbiage: 'contributor-card' : a.count }}<ng-container *ngIf="! isLast">, </ng-container>
{{a.action | eventVerbiage: 'contributor-card' : a.count }}
<ng-container *ngIf="! isLast">, </ng-container>
</ng-container>
</nz-descriptions-item>
<nz-descriptions-item nzTitle="Last Contribution">
Expand All @@ -23,4 +35,4 @@
</ng-container>
<ng-template #noContributors>
None
</ng-template>
</ng-template>
Loading