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

fix(ontology): display all classes in a property (DEV-564) #701

Merged
merged 2 commits into from Apr 6, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/app/project/ontology/ontology.component.scss
Expand Up @@ -83,8 +83,10 @@ $width: 340px;
margin: 16px 10%;

.property {
height: 56px !important;
height: auto;
min-height: 56px !important;
margin: 4px 0;
padding: 16px 0;
&.odd {
background-color: $primary_50;
}
Expand Down
@@ -1,6 +1,6 @@
<div class="property-info" (mouseenter)="mouseEnter()" (mouseleave)="mouseLeave()">

<div mat-line class="title">
<div mat-line class="title" [class.with-line-break]="!propCard">
<span class="icon" *ngIf="propType" [matTooltip]="propType?.group + ': ' + propType?.label + ' (' + propDef.id.split('#')[1] + ')'"
matTooltipPosition="above">
<mat-icon class="type">{{propType?.icon}}</mat-icon>
Expand All @@ -19,7 +19,7 @@
</span>
</div>

<div mat-line class="info additional-info" [class.flex]="propCard">
<div mat-line class="info additional-info" [class.flex]="propCard" [class.with-line-break]="!propCard">
<span [matTooltip]="'id: ' + propDef.id" matTooltipPosition="above" class="mat-caption">
{{propDef.id | split: '#':1}}
</span>
Expand All @@ -32,7 +32,7 @@
required
</span>
<!-- in case of ontology property: display corresponding resource classes -->
<span *ngIf="!propCard">
<span *ngIf="!propCard" class="white-space">
<span *ngIf="resClasses.length; else notUsed">
Property is used in:
<!-- <span>{{ resClasses.join(", ") }}</span> -->
Expand Down
38 changes: 22 additions & 16 deletions src/app/project/ontology/property-info/property-info.component.scss
Expand Up @@ -12,27 +12,33 @@
display: flex !important;
}

.mat-line.title {
line-height: 1.8;
.mat-icon {
top: 4px;
position: relative;
.mat-line {
&.title {
line-height: 1.8;
.mat-icon {
top: 4px;
position: relative;
}
}
}

.mat-line.info {
font-size: small;
&.info {
font-size: small;

.mat-caption {
color: rgba($dark, .7);
.mat-caption {
color: rgba($dark, .7);
}

.mat-icon {
width: 12px;
height: 12px;
font-size: small;
top: 2px;
position: relative;
}
}

.mat-icon {
width: 12px;
height: 12px;
font-size: small;
top: 2px;
position: relative;
&.with-line-break {
white-space: normal;
}
}

Expand Down