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

feat(remove property menu): add skeleton to mat menu until content loaded #1148

Merged
merged 6 commits into from Jul 18, 2023
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
Expand Up @@ -18,12 +18,25 @@
<mat-icon [matMenuTriggerFor]="classInfoMenu" class="menu-icon-button" (click)="canBeRemovedFromClass()">more_vert</mat-icon>
</span>
<mat-menu #classInfoMenu="matMenu">
<button mat-menu-item
[disabled] = "!propCanBeRemovedFromClass"
(click)="removePropertyFromClass.emit({iri: propDef.id, label: propDef.label})">
<mat-icon>link_off</mat-icon>
<span>remove property from class</span>
</button>
<div class='remove-menu-wrapper'>
<button mat-menu-item
[disabled] = "!propCanBeRemovedFromClass"
(click)="removePropertyFromClass.emit({iri: propDef.id, label: propDef.label})">
<mat-icon>link_off</mat-icon>
<ngx-skeleton-loader
*ngIf="propCanBeRemovedFromClass === undefined || propCanBeRemovedFromClass === null"
count="1"
appearance="line"
class='skeleton'
[theme]="{
'margin-bottom': 0,
'vertical-align': 'middle',
'min-width' : '16em'
}">
</ngx-skeleton-loader>
<span *ngIf="propCanBeRemovedFromClass !== undefined">remove property from class</span>
</button>
</div>
</mat-menu>
</div>
</div>
Expand Down
Expand Up @@ -64,3 +64,8 @@
font-size: medium;
cursor: pointer;
}

.remove-menu-wrapper {
min-width: 18em;
width: 18em;
}
1 change: 1 addition & 0 deletions apps/dsp-app/src/styles.scss
Expand Up @@ -185,6 +185,7 @@ button.space-reducer {

.mat-mdc-menu-panel {
min-height: 48px !important;
max-width: 400px !important;
}

.full-size-dialog {
Expand Down