From b68b0cfbaae0e37f9fd9b1af260075fdfc30a327 Mon Sep 17 00:00:00 2001
From: Carlo Minotti <50220438+minottic@users.noreply.github.com>
Date: Mon, 18 Nov 2024 16:06:49 +0100
Subject: [PATCH] Use CDKScroll for overview
* Add scroll component based on cdk
* Add tests
* Simplify logbook cover not to depend on matcard
* Fix scrolling and update on resize
* Add missing html change
* Add overview table preliminary changes
* Fix overview tests
* Enable search, add spinner
* Fix delete and edit for scroll
* Fit image in given space
---
scilog/src/app/app.module.ts | 4 +-
scilog/src/app/core/remote-data.service.ts | 2 +-
.../app/core/toolbar/toolbar.component.html | 2 +-
.../core/toolbar/toolbar.component.spec.ts | 2 +-
.../src/app/core/toolbar/toolbar.component.ts | 7 +-
.../search-window.component.spec.ts | 2 -
.../search-window/search-window.component.ts | 3 -
.../logbook-cover/logbook-cover.component.css | 1 -
.../logbook-cover.component.html | 88 +++------
.../logbook-cover.component.spec.ts | 19 --
.../logbook-cover/logbook-cover.component.ts | 3 -
.../overview-scroll.component.css | 20 ++
.../overview-scroll.component.html | 9 +
.../overview-scroll.component.spec.ts | 181 ++++++++++++++++++
.../overview-scroll.component.ts | 179 +++++++++++++++++
.../overview-table.component.spec.ts | 29 ++-
.../overview-table.component.ts | 31 ++-
.../src/app/overview/overview.component.html | 20 +-
.../app/overview/overview.component.spec.ts | 98 ++--------
scilog/src/app/overview/overview.component.ts | 83 ++------
20 files changed, 507 insertions(+), 276 deletions(-)
create mode 100644 scilog/src/app/overview/overview-scroll/overview-scroll.component.css
create mode 100644 scilog/src/app/overview/overview-scroll/overview-scroll.component.html
create mode 100644 scilog/src/app/overview/overview-scroll/overview-scroll.component.spec.ts
create mode 100644 scilog/src/app/overview/overview-scroll/overview-scroll.component.ts
diff --git a/scilog/src/app/app.module.ts b/scilog/src/app/app.module.ts
index 4d6905d8..cc7876ab 100644
--- a/scilog/src/app/app.module.ts
+++ b/scilog/src/app/app.module.ts
@@ -87,6 +87,7 @@ import { ResizedDirective } from '@shared/directives/resized.directive';
import { OverviewTableComponent } from './overview/overview-table/overview-table.component';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatSortModule } from '@angular/material/sort';
+import { OverviewScrollComponent } from './overview/overview-scroll/overview-scroll.component';
const appConfigInitializerFn = (appConfig: AppConfigService) => {
return () => appConfig.loadAppConfig();
@@ -133,7 +134,8 @@ const appConfigInitializerFn = (appConfig: AppConfigService) => {
SearchWindowComponent,
TaskComponent,
ResizedDirective,
- OverviewTableComponent
+ OverviewTableComponent,
+ OverviewScrollComponent
],
imports: [
BrowserModule,
diff --git a/scilog/src/app/core/remote-data.service.ts b/scilog/src/app/core/remote-data.service.ts
index c4bbc4f0..5754b8ff 100644
--- a/scilog/src/app/core/remote-data.service.ts
+++ b/scilog/src/app/core/remote-data.service.ts
@@ -622,7 +622,7 @@ export class SearchDataService extends RemoteDataService {
return this._searchString;
}
public set searchString(value: string) {
- this._searchString = value;
+ this._searchString = value ?? '';
}
protected addIncludeScope(): Object {
diff --git a/scilog/src/app/core/toolbar/toolbar.component.html b/scilog/src/app/core/toolbar/toolbar.component.html
index f032fa52..e3c4f467 100644
--- a/scilog/src/app/core/toolbar/toolbar.component.html
+++ b/scilog/src/app/core/toolbar/toolbar.component.html
@@ -12,7 +12,7 @@
-
+