Skip to content

Commit

Permalink
minimal-card-list: show spinner until tasks load
Browse files Browse the repository at this point in the history
  • Loading branch information
pshields committed May 30, 2019
1 parent 2042f70 commit daa7bf5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/task/displays/minimal_card_list/component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<mat-spinner *ngIf="(_tasks | async) === null"></mat-spinner>

<ng-container *ngIf="(_tasks | async) !== null">
<cyber-ui-minimal-task-card
*ngFor="let task of (_tasks | async)"
Expand Down
5 changes: 5 additions & 0 deletions lib/task/displays/minimal_card_list/component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
cyber-ui-minimal-task-card:not(:last-child) {
margin-bottom: 24px;
}

// Show the spinner in a slightly more vertically centered fashion
:host mat-spinner {
margin-top: 64px;
}
5 changes: 4 additions & 1 deletion lib/task/displays/minimal_card_list/module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';

import {MatProgressSpinnerModule} from '@angular/material';

import {CyberUiMinimalTaskCardModule} from '../minimal_card/module';

import {CyberUiMinimalTaskCardListComponent} from './component';
Expand All @@ -9,7 +11,8 @@ import {CyberUiMinimalTaskCardListComponent} from './component';
@NgModule({
imports: [
CommonModule,
CyberUiMinimalTaskCardModule
CyberUiMinimalTaskCardModule,
MatProgressSpinnerModule,
],
declarations: [
CyberUiMinimalTaskCardListComponent,
Expand Down

0 comments on commit daa7bf5

Please sign in to comment.