Skip to content

Commit

Permalink
fix: Remove small pixel differences in diagram cache dialog
Browse files Browse the repository at this point in the history
Small pixel differences led to small jumps when the diagram cache was
loaded. It feels smoother now.
  • Loading branch information
MoritzWeber0 committed Sep 13, 2024
1 parent 62eb891 commit d3da269
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 27 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ <h2 class="mb-5 text-xl font-medium">View diagrams</h2>
@if (this.diagramMetadata?.diagrams?.length === 0) {
Your model doesn't seem to contain diagrams.
} @else if (filteredDiagrams === undefined) {
<div class="flex flex-wrap">
<span>Loading diagrams...</span>
<div class="flex flex-wrap gap-2">
@for (_ of loaderArray; track $index) {
<ngx-skeleton-loader
class="m-2 grow basis-[calc(30%-20px)]"
class="h-[338px] grow"
[theme]="{
'border-radius': '5px',
height: '332px',
'min-width': '208px',
'border-radius': '10px',
height: '100%',
margin: '0px',
padding: '0px',
border: '1px solid white',
}"
></ngx-skeleton-loader>
Expand All @@ -59,12 +61,12 @@ <h2 class="mb-5 text-xl font-medium">View diagrams</h2>
@if (diagram.success) {
@if (!diagrams[diagram.uuid] || diagrams[diagram.uuid].loading) {
<ngx-skeleton-loader
class="mb-2 w-full"
class="mb-2 h-[200px] w-full"
[theme]="{
'border-radius': '5px',
margin: 0,
padding: 0,
height: '200px',
height: '100%',
width: '100%',
border: '1px solid white',
}"
Expand All @@ -79,7 +81,9 @@ <h2 class="mb-5 text-xl font-medium">View diagrams</h2>
</button>
}
} @else {
<div class="diagram-error">
<div
class="mb-2 flex h-[200px] flex-col items-center justify-center rounded border border-gray-400 py-[15px] text-center"
>
<mat-icon class="scale-[2] text-red-900">error</mat-icon> <br />
Diagram export has failed. <br />
Please contact your diagram cache administrator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import { ModelDiagramCodeBlockComponent } from './model-diagram-code-block/model
@Component({
selector: 'app-model-diagram-dialog',
templateUrl: './model-diagram-dialog.component.html',
styleUrls: ['./model-diagram-dialog.component.css'],
standalone: true,
imports: [
ModelDiagramCodeBlockComponent,
Expand Down

0 comments on commit d3da269

Please sign in to comment.