Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
acoffman committed Oct 2, 2023
2 parents 2398d74 + 3ccb958 commit 154a653
Show file tree
Hide file tree
Showing 83 changed files with 2,525 additions and 1,131 deletions.
8 changes: 8 additions & 0 deletions client/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ quote_type = single
[*.md]
max_line_length = off
trim_trailing_whitespace = false

[*.less]
quote_type = double
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@graphql-codegen/typescript-operations": "^2.5.12",
"@types/node": "^12.11.1",
"directory-tree": "^3.5.1",
"graphql": "^16.7.1",
"graphql": "^16.8.1",
"mustache": "^4.2.0",
"ngx-json-viewer": "^3.0.2",
"prettier": "^2.5.1",
Expand Down
2 changes: 2 additions & 0 deletions client/src/app/app.component.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'themes/overrides/descriptions-overrides.less';

.alert-container {
position: absolute;
z-index: 100;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<button
class="add-btn"
nz-button
nzSize="large"
nzShape="round"
nzSize="small"
nzType="link"
nz-dropdown
nzTrigger="click"
[nzDropdownMenu]="addMenu"
Expand Down Expand Up @@ -60,11 +60,13 @@
shape="circle"
[ngClass]="{ 'update-coi': viewer.invalidCoi }"
*nzSpaceItem></cvc-user-avatar>
<div
class="viewer-name"
*nzSpaceItem>
{{ viewer.username }}
</div>
<ng-container *ngIf="!cvcCollapsed">
<div
class="viewer-name"
*nzSpaceItem>
{{ viewer.username }}
</div>
</ng-container>
<i
nz-icon
nzType="caret-down"
Expand Down Expand Up @@ -123,30 +125,30 @@
</nz-dropdown-menu>
<nz-dropdown-menu #addMenu="nzDropdownMenu">
<ul nz-menu>
<li nz-menu-item routerLink="/evidence/add/submit">
<a>
Evidence Item
</a>
<li
nz-menu-item
routerLink="/evidence/add/submit">
<a> Evidence Item </a>
</li>
<li nz-menu-item routerLink="/assertions/add/submit">
<a>
Assertion
</a>
<li
nz-menu-item
routerLink="/assertions/add/submit">
<a> Assertion </a>
</li>
<li nz-menu-item routerLink="/sources/add">
<a>
Source Suggestion
</a>
<li
nz-menu-item
routerLink="/sources/add">
<a> Source Suggestion </a>
</li>
<li
nz-menu-item
*ngIf="viewer.isEditor">
<a (click)="this.addVariantModalVisible = true"> Variant </a>
</li>
<li nz-menu-item routerLink="/variant-groups/add/submit">
<a>
Variant Group
</a>
<li
nz-menu-item
routerLink="/variant-groups/add/submit">
<a> Variant Group </a>
</li>
</ul>
</nz-dropdown-menu>
Expand All @@ -158,9 +160,9 @@
[nzTitle]="coiModalTitle"
[nzFooter]="null"
(nzOnCancel)="this.handleCoiModalCancel()">
<ng-template #coiModalTitle
><span>Update your Conflict of Interest Statement</span></ng-template
>
<ng-template #coiModalTitle>
<span>Update your Conflict of Interest Statement</span>
</ng-template>
<ng-template #coiModalContent>
<cvc-user-coi-form
(coiUpdatedEvent)="this.coiUpdated()"></cvc-user-coi-form>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "themes/global-variables.less";
@import "ng-zorro-antd/style/color/colors.less";
@import 'themes/global-variables.less';
@import 'ng-zorro-antd/style/color/colors.less';

:host {
display: inline-block;
Expand Down Expand Up @@ -29,7 +29,7 @@
margin-right: 0;
background-color: @layout-header-background;
border: none;
color: #ccc;
color: @text-color-secondary-dark;
}

.notification-btn {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from '@angular/core'
import { Component, Input } from '@angular/core'
import { Observable } from 'rxjs'
import { Viewer, ViewerService } from '@app/core/services/viewer/viewer.service'
import { Maybe, ViewerNotificationCountGQL } from '@app/generated/civic.apollo'
Expand All @@ -12,6 +12,8 @@ import { environment } from 'environments/environment'
styleUrls: ['./viewer-button.component.less'],
})
export class CvcViewerButtonComponent {
@Input() cvcCollapsed: boolean = false

viewer$: Observable<Viewer>
unreadCount$: Observable<number>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
*ngIf="organization.profileImagePath; else noAvatar"
nz-comment-avatar
[nzSrc]="organization.profileImagePath"
[nzShape]="shape ? shape : 'circle'"
[nzSize]="size">
</nz-avatar>
<ng-template #noAvatar>
<nz-avatar
nz-comment-avatar
[nzShape]="shape ? shape : 'circle'"
[nzText]="organization.name"
[nzSize]="size"></nz-avatar>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface WithProfileImageAndName {
export class CvcOrganizationAvatarComponent implements OnInit {
@Input() organization!: WithProfileImageAndName
@Input() size!: number | 'large' | 'default' | 'small'
@Input() shape!: 'square' | 'circle'

ngOnInit() {
if (this.organization === undefined) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,91 +1,38 @@
<nz-card
*ngIf="inCard; else noCard"
[nzTitle]="organization.name">
<ng-template [ngTemplateOutlet]="content"> </ng-template>
<nz-card nz-size="small">
<nz-card-meta
[nzTitle]="organization.name"
[nzDescription]="organizationTag"
[nzAvatar]="organizationAvatar">
</nz-card-meta>
<ng-template #organizationAvatar>
<cvc-organization-avatar
[organization]="organization"
shape="square"
[size]="48"></cvc-organization-avatar>
</ng-template>
<ng-template #organizationTag>
<cvc-organization-tag
[org]="organization"
[enablePopover]="true">
</cvc-organization-tag>
</ng-template>
<div class="organization-card-content">
<nz-descriptions
nzBordered
nzSize="small"
[nzColumn]="2"
nzLayout="vertical">
<nz-descriptions-item
nzTitle="Description"
[nzSpan]="1">
<p
nz-typography
nzEllipsis
[nzEllipsisRows]="4"
[nzExpandable]="true">
{{ organization.description }}
</p>
</nz-descriptions-item>
</nz-descriptions>
</div>
</nz-card>

<ng-template #noCard>
<ng-template [ngTemplateOutlet]="content"> </ng-template>
</ng-template>

<ng-template #content>
<nz-row [nzGutter]="16">
<nz-col [nzSpan]="3">
<div class="org-avatar">
<cvc-organization-avatar
[organization]="organization"
[size]="128"></cvc-organization-avatar>
</div>
<div class="org-name">
<span nz-typography>
<strong>{{ organization.name }}</strong>
</span>
</div>
</nz-col>
<nz-col [nzSpan]="13">
<nz-card
nzTitle="Profile"
class="organization-profile"
nzSize="small"
[nzExtra]="orgLink">
<ng-template #orgLink>
<cvc-link-tag [href]="organization.url">
View Organization Website
</cvc-link-tag>
</ng-template>
<nz-descriptions
nzBordered
nzLayout="vertical"
nzSize="small"
[nzColumn]="1">
<nz-descriptions-item
nzTitle="Description"
[nzSpan]="1">
{{ organization.description }}
</nz-descriptions-item>
<nz-descriptions-item
nzTitle="Child Organizations"
[nzSpan]="1">
<cvc-tag-list *ngIf="organization.subGroups.length > 0">
<ng-container *ngFor="let suborg of organization.subGroups">
<cvc-organization-tag [org]="suborg"></cvc-organization-tag>
</ng-container>
</cvc-tag-list>
<ng-container *ngIf="organization.subGroups.length === 0">
<span
nz-typography
nzType="secondary">
<i>No child organizations specified.</i>
</span>
</ng-container>
</nz-descriptions-item>
</nz-descriptions>
</nz-card>
</nz-col>

<nz-col [nzSpan]="8">
<nz-card
nzSize="small"
nzTitle="Curation Stats"
[nzExtra]="subGroupToggle">
<cvc-stats-card
[stats]="
includeSubStats
? organization.orgAndSuborgsStatsHash
: organization.orgStatsHash
"
header="User Statistics"></cvc-stats-card>
</nz-card>
<ng-template #subGroupToggle>
<ng-container *ngIf="organization.subGroups.length > 0">
<label
nz-checkbox
[(ngModel)]="includeSubStats"
class="stats-toggle">
Include sub-orgs
</label>
</ng-container>
</ng-template>
</nz-col>
</nz-row>
</ng-template>
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
:host ::ng-deep {
.organization-profile {
.ant-card-body {
// remove card body padding
padding: 0;
// card title has a -1 bottom margin for some reason, partially occluding nz-description's top border
margin-top: 1px;
::host {
display: block;
.ant-card-meta {
::ng-deep .ant-card-meta-title {
line-height: 14px;
margin-bottom: 8px;
}
}
.ant-descriptions-view {
// removes nz-description container border -
// nz-card does provide an nzBordered option, but its label backgrounds
// and compact mode are only applied when its borders are toggled on
border: none;
}
.stats-toggle {
span {
padding-right: 0;
}
}
}

.org-avatar,
.org-name {
text-align: center;
}
.org-name {
font-size: 120%;
.organization-card-content {
// provide some margin between avatar & name,
// and remove padding from card content area
margin: 12px -13px -13px -13px;
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import { Component, Input, OnInit } from '@angular/core'
import {
OrganizationDetailFieldsFragment,
OrganizationGroupsFieldsFragment,
} from '@app/generated/civic.apollo'
ChangeDetectionStrategy,
Component,
Input,
OnInit,
} from '@angular/core'
import { OrganizationGroupsFieldsFragment } from '@app/generated/civic.apollo'

@Component({
selector: 'cvc-organization-card',
templateUrl: './organization-card.component.html',
styleUrls: ['./organization-card.component.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CvcOrganizationCardComponent implements OnInit {
@Input() organization!: OrganizationDetailFieldsFragment
// @Input() organization!: OrganizationGroupsFieldsFragment;
@Input() inCard: boolean = true

includeSubStats: any = true
@Input() organization!: OrganizationGroupsFieldsFragment

ngOnInit() {
if (this.organization == undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { NzCheckboxModule } from 'ng-zorro-antd/checkbox'
import { FormsModule } from '@angular/forms'
import { CvcLinkTagModule } from '@app/components/shared/link-tag/link-tag.module'
import { CvcTherapyTagModule } from '@app/components/therapies/cvc-therapy-tag/cvc-therapy-tag.module'
import { CvcTagOverflowModule } from '@app/components/shared/tag-overflow/tag-overflow.module'

@NgModule({
declarations: [CvcOrganizationCardComponent],
Expand All @@ -35,6 +36,8 @@ import { CvcTherapyTagModule } from '@app/components/therapies/cvc-therapy-tag/c
NzDescriptionsModule,
NzDividerModule,
NzCheckboxModule,

CvcTagOverflowModule,
CvcLinkTagModule,
CvcClinicalTrialTagModule,
CvcDiseaseTagModule,
Expand Down
Loading

0 comments on commit 154a653

Please sign in to comment.