From 0c8c9980eb941d7986aeff8c59c354d1b9517649 Mon Sep 17 00:00:00 2001 From: guerler Date: Tue, 20 May 2025 17:41:59 -0400 Subject: [PATCH 1/2] Prevent opening dataset tab view in window manager --- client/src/components/History/Content/ContentItem.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/History/Content/ContentItem.vue b/client/src/components/History/Content/ContentItem.vue index ab6a5ac5773..af831e89fa6 100644 --- a/client/src/components/History/Content/ContentItem.vue +++ b/client/src/components/History/Content/ContentItem.vue @@ -268,10 +268,10 @@ function onDisplay() { // Only conditionally force to keep urls clean most of the time. if (route.path === itemUrls.value.display) { // @ts-ignore - monkeypatched router, drop with migration. - router.push(itemUrls.value.display, { title: props.name, force: true }); + router.push(itemUrls.value.display, { force: true }); } else if (itemUrls.value.display) { // @ts-ignore - monkeypatched router, drop with migration. - router.push(itemUrls.value.display, { title: props.name }); + router.push(itemUrls.value.display); } } } From 1b1d959a8adadc47a9a0a733c1acb246a48b32b2 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Tue, 3 Jun 2025 14:21:39 -0400 Subject: [PATCH 2/2] Add explicit preventWindowManager parameter to router.push Replace implicit window manager control (based on title presence) with explicit preventWindowManager parameter for clearer intent. Leaving off title still works, but having an explicit control is what we should push for. --- client/src/components/History/Content/ContentItem.vue | 4 ++-- client/src/entry/analysis/router-push.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/src/components/History/Content/ContentItem.vue b/client/src/components/History/Content/ContentItem.vue index af831e89fa6..5ae78846412 100644 --- a/client/src/components/History/Content/ContentItem.vue +++ b/client/src/components/History/Content/ContentItem.vue @@ -268,10 +268,10 @@ function onDisplay() { // Only conditionally force to keep urls clean most of the time. if (route.path === itemUrls.value.display) { // @ts-ignore - monkeypatched router, drop with migration. - router.push(itemUrls.value.display, { force: true }); + router.push(itemUrls.value.display, { force: true, preventWindowManager: true }); } else if (itemUrls.value.display) { // @ts-ignore - monkeypatched router, drop with migration. - router.push(itemUrls.value.display); + router.push(itemUrls.value.display, { preventWindowManager: true }); } } } diff --git a/client/src/entry/analysis/router-push.js b/client/src/entry/analysis/router-push.js index dbdd15cdbbb..e75f3f6d975 100644 --- a/client/src/entry/analysis/router-push.js +++ b/client/src/entry/analysis/router-push.js @@ -7,13 +7,13 @@ import { addSearchParams } from "utils/url"; * refresh if needed. * * @param {String} Location as parsed to original router.push() - * @param {Object} Custom options, to provide a title and/or force reload + * @param {Object} Custom options, to provide a title, force reload, and/or prevent window manager */ export function patchRouterPush(VueRouter) { const originalPush = VueRouter.prototype.push; VueRouter.prototype.push = function push(location, options = {}) { // add key to location to force component refresh - const { title, force } = options; + const { title, force, preventWindowManager } = options; if (force) { location = addSearchParams(location, { __vkey__: Date.now() }); } @@ -27,7 +27,7 @@ export function patchRouterPush(VueRouter) { } // show location in window manager const Galaxy = getGalaxyInstance(); - if (title && Galaxy.frame && Galaxy.frame.active) { + if (title && !preventWindowManager && Galaxy.frame && Galaxy.frame.active) { Galaxy.frame.add({ title: title, url: location }); return; }