From 17d97b8ba24b3d1591f9895319a40ed06c4755a1 Mon Sep 17 00:00:00 2001 From: Giroscope Date: Mon, 5 Feb 2024 10:26:00 +0100 Subject: [PATCH] fix(table): fix cell size / add text-overflow: clip / minimize "type"/"mode"/"interval" column / define first/last cell size --- .../history-query-items.component.html | 4 ++-- .../history-query-list.component.html | 20 ++++++++++--------- .../history-query-list.component.spec.ts | 4 ++-- .../src/app/north/north-list.component.html | 13 +++++++----- .../south-detail/south-detail.component.html | 2 +- .../south-items/south-items.component.html | 6 +++--- .../src/app/south/south-list.component.html | 13 +++++++----- frontend/src/styles.scss | 7 +++++++ 8 files changed, 42 insertions(+), 27 deletions(-) diff --git a/frontend/src/app/history-query/history-query-items/history-query-items.component.html b/frontend/src/app/history-query/history-query-items/history-query-items.component.html index c1a489db7e..2e94cf96f1 100644 --- a/frontend/src/app/history-query/history-query-items/history-query-items.component.html +++ b/frontend/src/app/history-query/history-query-items/history-query-items.component.html @@ -60,10 +60,10 @@ - + - + diff --git a/frontend/src/app/history-query/history-query-list.component.html b/frontend/src/app/history-query/history-query-list.component.html index 609464b771..00b488a2fe 100644 --- a/frontend/src/app/history-query/history-query-list.component.html +++ b/frontend/src/app/history-query/history-query-list.component.html @@ -45,11 +45,11 @@

{{ setting.label }}
- - - - - + + + + + @@ -58,10 +58,12 @@

-
{{ query.name }} -
{{ query.startTime | datetime:'ff' }}
-
-
{{ query.endTime | datetime:'ff' }}
+
+
+ {{ query.startTime | datetime:'ff' }} +
+ {{ query.endTime | datetime:'ff' }} +
{{ query.description }} diff --git a/frontend/src/app/history-query/history-query-list.component.spec.ts b/frontend/src/app/history-query/history-query-list.component.spec.ts index cd907f7bce..e7af504dee 100644 --- a/frontend/src/app/history-query/history-query-list.component.spec.ts +++ b/frontend/src/app/history-query/history-query-list.component.spec.ts @@ -73,12 +73,12 @@ describe('HistoryQueryListComponent', () => { expect(tester.title).toContainText('History queries'); expect(tester.historyQueryList.length).toBe(2); expect(tester.historyQueryList[0].elements('td')[1]).toContainText(historyQueries[0].name); - expect(tester.historyQueryList[0].elements('td')[2]).toContainText('2 Feb 2020, 03:022 Feb 2022, 03:02'); + expect(tester.historyQueryList[0].elements('td')[2]).toContainText(' 2 Feb 2020, 03:02 2 Feb 2022, 03:02 '); expect(tester.historyQueryList[0].elements('td')[3]).toContainText(historyQueries[0].description); expect(tester.historyQueryList[0].elements('td')[4].elements('button').length).toBe(2); expect(tester.historyQueryList[0].elements('td')[4].elements('a').length).toBe(3); expect(tester.historyQueryList[1].elements('td')[1]).toContainText(historyQueries[1].name); - expect(tester.historyQueryList[1].elements('td')[2]).toContainText('2 Feb 2020, 03:022 Feb 2022, 03:02'); + expect(tester.historyQueryList[1].elements('td')[2]).toContainText(' 2 Feb 2020, 03:02 2 Feb 2022, 03:02 '); expect(tester.historyQueryList[1].elements('td')[3]).toContainText(historyQueries[1].description); expect(tester.historyQueryList[1].elements('td')[4].elements('button').length).toBe(2); expect(tester.historyQueryList[1].elements('td')[4].elements('a').length).toBe(3); diff --git a/frontend/src/app/north/north-list.component.html b/frontend/src/app/north/north-list.component.html index 81799a4c01..bfa3a2b9ed 100644 --- a/frontend/src/app/north/north-list.component.html +++ b/frontend/src/app/north/north-list.component.html @@ -1,3 +1,6 @@ +
@@ -45,11 +48,11 @@

- - - - - + + + + + diff --git a/frontend/src/app/south/south-detail/south-detail.component.html b/frontend/src/app/south/south-detail/south-detail.component.html index 83e052c9a7..1141302673 100644 --- a/frontend/src/app/south/south-detail/south-detail.component.html +++ b/frontend/src/app/south/south-detail/south-detail.component.html @@ -54,7 +54,7 @@

-

+ diff --git a/frontend/src/app/south/south-items/south-items.component.html b/frontend/src/app/south/south-items/south-items.component.html index 443bdf991d..3b35a7c944 100644 --- a/frontend/src/app/south/south-items/south-items.component.html +++ b/frontend/src/app/south/south-items/south-items.component.html @@ -60,11 +60,11 @@
{{ setting.key }}{{ setting.key }} {{ setting.value }}
- + - + - + diff --git a/frontend/src/app/south/south-list.component.html b/frontend/src/app/south/south-list.component.html index d0a0f79b12..2c8f2accba 100644 --- a/frontend/src/app/south/south-list.component.html +++ b/frontend/src/app/south/south-list.component.html @@ -1,3 +1,6 @@ +
@@ -45,11 +48,11 @@

{{ setting.label }}
- - - - - + + + + + diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index 6ba5802e65..dff45dbc6e 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -208,10 +208,12 @@ img.oib-image-header { // first case of the first line th:first-child { border-top-left-radius: 1rem; + width: 3rem; } // last case of the first line th:last-child { border-top-right-radius: 1rem; + width: 9rem; } // alternative case if oib-box-title is on top of table .light { @@ -226,6 +228,10 @@ img.oib-image-header { vertical-align: middle; padding-left: 1rem; border-bottom-width: 0; + max-width: 0; + text-overflow: clip; + overflow: hidden; + white-space: nowrap; } // line tr { @@ -247,6 +253,7 @@ img.oib-image-header { td:last-child { text-align: right; padding-right: 1em; + overflow: visible; } } // customised colours on the lines (one out of two)