From ca5c69bd03e88cbbae5fee59e64fa870ed173b61 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Wed, 3 Sep 2025 15:16:00 +0100 Subject: [PATCH 1/3] Rename workspace stylesheet and remove unused styles --- src/styles/cylc/{_workflow.scss => _workspace.scss} | 3 --- src/styles/index.scss | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) rename src/styles/cylc/{_workflow.scss => _workspace.scss} (96%) diff --git a/src/styles/cylc/_workflow.scss b/src/styles/cylc/_workspace.scss similarity index 96% rename from src/styles/cylc/_workflow.scss rename to src/styles/cylc/_workspace.scss index caf460f92..3072d2aa5 100644 --- a/src/styles/cylc/_workflow.scss +++ b/src/styles/cylc/_workspace.scss @@ -35,9 +35,6 @@ .lm-BoxPanel { flex: 1 1 auto; - .lm-TabBar-content { - padding-left: 0; - } } } } diff --git a/src/styles/index.scss b/src/styles/index.scss index d7a75a465..7d1198f33 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -29,7 +29,7 @@ @use "cylc/table"; @use "cylc/user_profile"; @use "cylc/warning"; -@use "cylc/workflow"; +@use "cylc/workspace"; @use "cylc/tooltip"; @use "cylc/mutation_form"; @use "cylc/menu"; From 59d04f1427054dc55274d338791de4f44d3b635a Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Wed, 3 Sep 2025 15:16:35 +0100 Subject: [PATCH 2/3] Show log view type in Lumino tab title and selected file in caption --- src/components/cylc/workspace/Lumino.vue | 1 + src/components/cylc/workspace/luminoWidget.js | 5 +++++ src/styles/cylc/_workspace.scss | 4 ++-- src/views/Log.vue | 20 ++++++++++++++++++- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/components/cylc/workspace/Lumino.vue b/src/components/cylc/workspace/Lumino.vue index 619d59619..2e8e4d386 100644 --- a/src/components/cylc/workspace/Lumino.vue +++ b/src/components/cylc/workspace/Lumino.vue @@ -27,6 +27,7 @@ along with this program. If not, see . :is="props.allViews.get(name).component" :workflow-name="workflowName" v-model:initial-options="views.get(id).initialOptions" + :widgetID="id" class="h-100" /> diff --git a/src/components/cylc/workspace/luminoWidget.js b/src/components/cylc/workspace/luminoWidget.js index 1a60cbbcb..eefeacacc 100644 --- a/src/components/cylc/workspace/luminoWidget.js +++ b/src/components/cylc/workspace/luminoWidget.js @@ -66,6 +66,10 @@ export class LuminoWidget extends Widget { // which cause the tab panel to be updated. this.title.label = this.name this.title.closable = this.closable + eventBus.on(`lumino:update-tab:${this.id}`, ({ title, caption }) => { + this.title.label = title + this.title.caption = caption + }) super.onBeforeAttach(msg) } @@ -79,6 +83,7 @@ export class LuminoWidget extends Widget { onCloseRequest (msg) { // Emit an event so that the Vue component knows that it needs to be removed too eventBus.emit('lumino:deleted', this.id) + eventBus.off(`lumino:update-tab:${this.id}`) super.onCloseRequest(msg) } diff --git a/src/styles/cylc/_workspace.scss b/src/styles/cylc/_workspace.scss index 3072d2aa5..08f23efb0 100644 --- a/src/styles/cylc/_workspace.scss +++ b/src/styles/cylc/_workspace.scss @@ -42,11 +42,11 @@ .lm-TabBar-tab { display: flex; align-items: center; - border-bottom: 1px solid #C0C0C0; + flex-basis: 10rem !important; // Min width of tab } .lm-TabBar-tabLabel { font-family: settings.$body-font-family; - font-size: 1rem; + font-size: 0.9rem; } .lm-TabBar-tabCloseIcon { color: inherit; diff --git a/src/views/Log.vue b/src/views/Log.vue index 2199b9419..3a0e2c918 100644 --- a/src/views/Log.vue +++ b/src/views/Log.vue @@ -201,6 +201,7 @@ import CopyBtn from '@/components/core/CopyBtn.vue' import { Alert } from '@/model/Alert.model' import { getJobLogFileFromState } from '@/model/JobState.model' import { useLogWordWrapDefault } from '@/composables/localStorage' +import { eventBus } from '@/services/eventBus' /** * Query used to retrieve data for the Log view. @@ -314,6 +315,12 @@ export default { props: { initialOptions, + /** ID of widget if the log view is in a Lumino tab. */ + widgetID: { + type: String, + required: false, + default: null, + }, }, setup (props, { emit }) { @@ -429,7 +436,18 @@ export default { id: this.id ?? undefined, // (do not trigger the callback on null ⇄ undefined) file: this.file ?? undefined }), - async ({ id }, old) => { + async ({ id, file }, old) => { + // update the widget tab caption when the id or file change + if (this.widgetID) { + const prefix = this.relativeID ? `${this.relativeID} – ` : '' + eventBus.emit( + `lumino:update-tab:${this.widgetID}`, + { + title: this.jobLog ? 'Log – Job' : 'Log – Workflow', + caption: `${prefix}${file ?? 'No file selected'}`, + } + ) + } // update the query when the id or file change this.updateQuery() // refresh the file & file list when the id changes From 25b272ec89f53a1433975a4288cfbd08ffac33b5 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Wed, 3 Sep 2025 15:16:36 +0100 Subject: [PATCH 3/3] Changelog --- changes.d/2290.feat.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes.d/2290.feat.md diff --git a/changes.d/2290.feat.md b/changes.d/2290.feat.md new file mode 100644 index 000000000..1af40e292 --- /dev/null +++ b/changes.d/2290.feat.md @@ -0,0 +1 @@ +Added tooltip to distinguish between multiple log view tabs.