From 7d8a28c5d0e4026db9f5859e26b3c721246b877f Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Tue, 6 Aug 2024 16:16:16 -0500 Subject: [PATCH 1/2] [24.0] Improve workflow creating/saving UX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The UX is improved with the following changes: - 🎨 For any unsaved changes in the workflow editor, the following text has been added next to the workflow name header: "_(unsaved changes)_" - 🐞 We ensure the reload page confirmation is triggered on changing workflow name and annotation as well. - 🐞 We also ensure that the router reload confirmation flag is reset on route change, since sometimes, the confirmation was not cleared when the route changed and the alert was shown needlessly. Fixes https://github.com/galaxyproject/galaxy/issues/18609 --- client/src/components/Workflow/Editor/Index.vue | 12 ++++++++---- .../src/components/Workflow/Editor/Options.vue | 2 +- client/src/entry/analysis/App.vue | 16 +++++++++++++++- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/client/src/components/Workflow/Editor/Index.vue b/client/src/components/Workflow/Editor/Index.vue index 420cbb473a3a..fe473d3cd4e6 100644 --- a/client/src/components/Workflow/Editor/Index.vue +++ b/client/src/components/Workflow/Editor/Index.vue @@ -42,8 +42,12 @@
Workflow Editor - {{ name }} - Create New Workflow + + {{ name || "..." }} + + (Click Save to create this workflow) + +
route.fullPath, + (newVal, oldVal) => { + // sometimes, the confirmation is not cleared when the route changes + // and the confirmation alert is shown needlessly + if (confirmation.value) { + confirmation.value = null; + } + } + ); + return { + confirmation, toastRef, confirmDialogRef, uploadModal, @@ -128,7 +143,6 @@ export default { data() { return { config: getGalaxyInstance().config, - confirmation: null, resendUrl: `${getAppRoot()}user/resend_verification`, windowManager: null, }; From 76cbfbe2ce005bed16d8af01021375eac268c191 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Wed, 7 Aug 2024 11:11:25 -0500 Subject: [PATCH 2/2] replace `Create` with `Save` when inside the editor --- client/src/components/Workflow/Editor/Index.vue | 4 +--- client/src/components/Workflow/Editor/Options.vue | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/client/src/components/Workflow/Editor/Index.vue b/client/src/components/Workflow/Editor/Index.vue index fe473d3cd4e6..cb18d5094a60 100644 --- a/client/src/components/Workflow/Editor/Index.vue +++ b/client/src/components/Workflow/Editor/Index.vue @@ -44,9 +44,7 @@ Workflow Editor {{ name || "..." }} - - (Click Save to create this workflow) - + (unsaved changes) diff --git a/client/src/components/Workflow/Editor/Options.vue b/client/src/components/Workflow/Editor/Options.vue index e8fbf85a2509..9d7e0035c4b2 100644 --- a/client/src/components/Workflow/Editor/Options.vue +++ b/client/src/components/Workflow/Editor/Options.vue @@ -28,7 +28,7 @@ const { confirm } = useConfirmDialog(); const saveHover = computed(() => { if (props.isNewTempWorkflow) { - return "Create a new workflow"; + return "Save Workflow"; } else if (!props.hasChanges) { return "Workflow has no changes"; } else if (props.hasInvalidConnections) {