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

fixes minor UI issues discovered during v18 upgrades #1091

Merged
merged 2 commits into from
Aug 15, 2024
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 @@ -54,12 +54,10 @@
Name
</th>
<th
nzLeft
nzWidth="70px">
Type
</th>
<th
nzLeft
nzWidth="200px">
Aliases
</th>
Expand Down Expand Up @@ -130,7 +128,7 @@
filterChange$.next()
"></cvc-clearable-input-filter>
</th>
<th nzLeft>
<th>
<nz-select
nzAllowClear
nzSize="small"
Expand All @@ -148,7 +146,7 @@
</nz-option>
</nz-select>
</th>
<th nzLeft>
<th>
<cvc-clearable-input-filter
[(inputModel)]="aliasInput"
(inputModelChange)="
Expand Down Expand Up @@ -182,7 +180,7 @@
let-index="index">
<tr class="data-row">
<td nzLeft>
<cvc-feature-tag [feature]="feature"></cvc-feature-tag>
<cvc-feature-tag [feature]="feature!"></cvc-feature-tag>
</td>
<td>
<span
Expand All @@ -192,7 +190,7 @@
{{ feature.featureInstanceType | titlecase }}
</span>
</td>
<td nzLeft>
<td>
<cvc-plain-tag-overflow
[tags]="feature.featureAliases"
[matchingText]="aliasInput"></cvc-plain-tag-overflow>
Expand Down Expand Up @@ -242,7 +240,7 @@
<!-- card's title template -->
<ng-template #titleTemplate>
<ng-container *ngIf="this.cvcTitleTemplate">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, if you switch this from an *ngIf to the new @if, does it remove the need to assert that the template exists with !?

At least so far the new @ things seem to be smarter about types in my experience,.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave it a try, but still get the TS error b/c cvcTitleTemplate's type is defined as Maybe<TemplateRef<void>>. We'd have to switch that to TemplateRef<void> to remove the ! assertion.

<ng-template [ngTemplateOutlet]="cvcTitleTemplate"></ng-template>
<ng-template [ngTemplateOutlet]="cvcTitleTemplate!"></ng-template>
</ng-container>
<ng-container *ngIf="this.cvcTitle">
{{ this.cvcTitle }}
Expand Down
44 changes: 23 additions & 21 deletions client/src/app/layout/layout.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<i
nz-icon
nzType="civic-assertion"></i>
<a routerLink="/assertions">Assertions</a>
<a routerLink="/assertions"><span>Assertions</span></a>
</li>

<li
Expand All @@ -53,7 +53,7 @@
<i
nz-icon
nzType="civic-evidence"></i>
<a routerLink="/evidence">Evidence</a>
<a routerLink="/evidence"><span>Evidence</span></a>
</li>

<li
Expand All @@ -65,7 +65,9 @@
<i
nz-icon
nzType="civic-molecularprofile"></i>
<a routerLink="/molecular-profiles">Molecular Profiles</a>
<a routerLink="/molecular-profiles"
><span>Molecular Profiles</span></a
>
</li>

<li
Expand All @@ -78,7 +80,7 @@
<i
nz-icon
nzType="civic-feature"></i>
<a routerLink="/features">Features</a>
<a routerLink="/features"><span>Features</span></a>
</li>

<li
Expand All @@ -91,7 +93,7 @@
<i
nz-icon
nzType="civic-variant"></i>
<a routerLink="/variants">Variants</a>
<a routerLink="/variants"><span>Variants</span></a>
</li>

<li
Expand All @@ -104,7 +106,7 @@
<i
nz-icon
nzType="civic-variantgroup"></i>
<a routerLink="/variant-groups">Variant Groups</a>
<a routerLink="/variant-groups"><span>Variant Groups</span></a>
</li>
</ul>
</li>
Expand All @@ -118,7 +120,7 @@
<i
nz-icon
nzType="civic-clinicaltrial"></i>
<a routerLink="/clinical-trials">Clinical Trials</a>
<a routerLink="/clinical-trials"><span>Clinical Trials</span></a>
</li>

<li
Expand All @@ -130,7 +132,7 @@
<i
nz-icon
nzType="civic-disease"></i>
<a routerLink="/diseases">Diseases</a>
<a routerLink="/diseases"><span>Diseases</span></a>
</li>

<li
Expand All @@ -142,7 +144,7 @@
<i
nz-icon
nzType="civic-therapy"></i>
<a routerLink="/therapies">Therapies</a>
<a routerLink="/therapies"><span>Therapies</span></a>
</li>

<li
Expand All @@ -154,7 +156,7 @@
<i
nz-icon
nzType="civic-phenotype"></i>
<a routerLink="/phenotypes">Phenotypes</a>
<a routerLink="/phenotypes"><span>Phenotypes</span></a>
</li>

<li
Expand All @@ -167,7 +169,7 @@
<i
nz-icon
nzType="civic-source"></i>
<a routerLink="/sources">Sources</a>
<a routerLink="/sources"><span>Sources</span></a>
</li>

<li
Expand All @@ -179,7 +181,7 @@
<i
nz-icon
nzType="civic-varianttype"></i>
<a routerLink="/variant-types">Variant Types</a>
<a routerLink="/variant-types"><span>Variant Types</span></a>
</li>

<li
Expand All @@ -195,7 +197,7 @@
<i
nz-icon
nzType="civic-event"></i>
<a routerLink="/curation/activity"> Activity </a>
<a routerLink="/curation/activity"><span>Activity</span></a>
</li>
<li
nz-menu-item
Expand All @@ -206,7 +208,7 @@
<i
nz-icon
nzType="civic-queue"></i>
<a routerLink="/curation/queues">Queues</a>
<a routerLink="/curation/queues"><span>Queues</span></a>
</li>
</ul>
</li>
Expand All @@ -225,9 +227,9 @@
nzType="civic-curator"></i>
<a
routerLink="/users"
id="main-users"
>Contributors</a
>
id="main-users">
<span>Contributors</span>
</a>
</li>

<li
Expand All @@ -241,9 +243,9 @@
nzType="civic-organization"></i>
<a
routerLink="/organizations"
id="main-organization"
>Organizations</a
>
id="main-organization">
<span>Organizations</span>
</a>
</li>
</ul>
</li>
Expand All @@ -263,7 +265,7 @@
<a
routerLink="/releases"
id="releases">
Data Releases
<span>Data Releases</span>
</a>
</li>
</ul>
Expand Down
4 changes: 4 additions & 0 deletions client/src/app/layout/layout.component.less
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ nz-sider {
::ng-deep .ant-menu-item-group-title {
text-align: center;
}
// hide menu label when collapsed
::ng-deep .ant-menu-title-content a span {
display: none;
}
}
}

Expand Down
Loading