From 3f340ccabd6035a6d8372c4eb6a5b543a9674f1a Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Wed, 17 Jun 2026 15:11:18 +0100 Subject: [PATCH 1/3] Collapse action logs by default --- .../labThingsComponents/actionLogDisplay.vue | 167 +++++++++++++++--- .../tabContentComponents/actionTab.vue | 4 - 2 files changed, 141 insertions(+), 30 deletions(-) diff --git a/webapp/src/components/labThingsComponents/actionLogDisplay.vue b/webapp/src/components/labThingsComponents/actionLogDisplay.vue index 38b842aa..9709de9a 100644 --- a/webapp/src/components/labThingsComponents/actionLogDisplay.vue +++ b/webapp/src/components/labThingsComponents/actionLogDisplay.vue @@ -1,25 +1,55 @@ @@ -36,15 +66,28 @@ export default { type: Array, required: true, }, + collapsedByDefault: { + type: Boolean, + default: true, + }, }, data() { return { userIsHovering: false, + isCollapsed: this.collapsedByDefault, }; }, computed: { + latestMessage() { + if (!this.log.length) { + return ""; + } + + return this.log[this.log.length - 1].message; + }, + errorMessage() { let logLength = this.log.length; var defaultMessage = "Unexpected error, please check the logs"; @@ -62,18 +105,33 @@ export default { watch: { log: { handler() { - this.scrollToBottom(); + if (!this.isCollapsed) { + this.scrollToBottom(); + } }, deep: true, }, - taskStatus: { - handler() { + + taskStatus() { + if (!this.isCollapsed) { this.scrollToBottom(); - }, + } + }, + + collapsedByDefault(newValue) { + this.isCollapsed = newValue; }, }, methods: { + toggleLog() { + this.isCollapsed = !this.isCollapsed; + + if (!this.isCollapsed) { + this.scrollToBottom(); + } + }, + onMouseEnter() { this.userIsHovering = true; }, @@ -95,16 +153,34 @@ export default { diff --git a/webapp/src/components/tabContentComponents/actionTab.vue b/webapp/src/components/tabContentComponents/actionTab.vue index 4555c1ee..36570daf 100644 --- a/webapp/src/components/tabContentComponents/actionTab.vue +++ b/webapp/src/components/tabContentComponents/actionTab.vue @@ -219,8 +219,4 @@ export default { .control-component { width: 33%; } - -#log-display { - height: 20em; -} From c860e1ee220c516d1f4cf66bd8c2a4e3d171c51a Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Wed, 17 Jun 2026 16:40:58 +0100 Subject: [PATCH 2/3] Apparently we do extra linting checks now? --- webapp/src/components/labThingsComponents/actionLogDisplay.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/components/labThingsComponents/actionLogDisplay.vue b/webapp/src/components/labThingsComponents/actionLogDisplay.vue index 9709de9a..43bd0a16 100644 --- a/webapp/src/components/labThingsComponents/actionLogDisplay.vue +++ b/webapp/src/components/labThingsComponents/actionLogDisplay.vue @@ -213,7 +213,7 @@ export default { background: transparent; border: none; padding: 4px; - color: var(--uk-inverse-color, inherit); /*get the colour of the text from ui-kit*/ + color: var(--uk-inverse-color, inherit); /* get the colour of the text from ui-kit */ } .material-symbols-outlined { From adbbed3961975f3d1c5d14c7e211fca1bf47714a Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Wed, 17 Jun 2026 17:49:23 +0100 Subject: [PATCH 3/3] More flexible resizing for small screens --- .../labThingsComponents/actionLogDisplay.vue | 15 +++++++++++---- .../labThingsComponents/actionStatusModal.vue | 19 ++++++++++++++++++- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/webapp/src/components/labThingsComponents/actionLogDisplay.vue b/webapp/src/components/labThingsComponents/actionLogDisplay.vue index 43bd0a16..364a8bfb 100644 --- a/webapp/src/components/labThingsComponents/actionLogDisplay.vue +++ b/webapp/src/components/labThingsComponents/actionLogDisplay.vue @@ -156,20 +156,26 @@ export default { /* Expanded view */ .log-wrapper { position: relative; - height: 200px; + flex: 1 1 200px; /* prefer 200px, but shrink if the container runs out of room */ + min-height: 2.6em; /* hard floor: roughly two lines of text */ overflow: hidden; margin-bottom: 0; margin-top: 0; + display: flex; + flex-direction: column; } .action-log-display { width: 100%; position: relative; - height: 90%; + flex: 1 1 auto; + min-height: 0; + display: flex; + flex-direction: column; } .log-summary { - padding: 1em; + padding: 0.6em; padding-right: 2.5em; /* reserve room for the toggle button, prevents overlap */ display: flex; align-items: center; @@ -180,7 +186,8 @@ export default { } .log-container { - height: 90%; + flex: 1 1 auto; + min-height: 0; overflow: auto; background-color: white; color: black; diff --git a/webapp/src/components/labThingsComponents/actionStatusModal.vue b/webapp/src/components/labThingsComponents/actionStatusModal.vue index 88ea7f42..899a793b 100644 --- a/webapp/src/components/labThingsComponents/actionStatusModal.vue +++ b/webapp/src/components/labThingsComponents/actionStatusModal.vue @@ -110,6 +110,7 @@ export default { place-content: stretch flex-start; align-items: center; width: 100%; + flex: 0 0 auto; } #progress-and-cancel-row .stretchy { @@ -130,7 +131,23 @@ export default { flex-direction: column; } +#status-modal h2 { + flex: 0 0 auto; // title never shrinks +} + +#status-modal .action-log-display { + flex: 1 1 auto; + min-height: 0; +} + +#status-modal .log-wrapper { + flex: 1 1 200px; // prefer 200px, shrink only under pressure + min-height: 2.6em; // floor: one line +} + #status-modal .log-container { - height: 10em; + height: auto; + flex: 1 1 auto; + min-height: 2.6em; }