From 97e33fd4b4c8dc3ab3b3728e6f6f6cc0718fda88 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Tue, 13 Feb 2024 17:16:59 +0000 Subject: [PATCH 1/7] Use `initialOptions` prop to save view state This is saved along with the Lumino layout for restoring after navigation. Implemented for the log view only so far. --- src/components/cylc/cylcObject/Menu.vue | 2 +- src/components/cylc/workflow/Lumino.vue | 14 +-- src/views/Log.vue | 124 +++++++++++++++--------- src/views/initialOptions.js | 62 ++++++++++++ tests/e2e/specs/log.cy.js | 49 ++++++++++ tests/unit/views/initialOptions.spec.js | 51 ++++++++++ tests/unit/views/log.vue.spec.js | 45 +++++++-- 7 files changed, 283 insertions(+), 64 deletions(-) create mode 100644 src/views/initialOptions.js create mode 100644 tests/unit/views/initialOptions.spec.js diff --git a/src/components/cylc/cylcObject/Menu.vue b/src/components/cylc/cylcObject/Menu.vue index 8c6f2c293..a62b6e75a 100644 --- a/src/components/cylc/cylcObject/Menu.vue +++ b/src/components/cylc/cylcObject/Menu.vue @@ -279,7 +279,7 @@ export default { { name: 'Log', initialOptions: { - relativeID: this.node.tokens.relativeID + relativeID: this.node.tokens.relativeID || null } } ) diff --git a/src/components/cylc/workflow/Lumino.vue b/src/components/cylc/workflow/Lumino.vue index 65151f188..61cea3d87 100644 --- a/src/components/cylc/workflow/Lumino.vue +++ b/src/components/cylc/workflow/Lumino.vue @@ -19,14 +19,14 @@ along with this program. If not, see .