From baf70fd476ff08ae23ad02c9b1de2dae58d46e28 Mon Sep 17 00:00:00 2001
From: davelopez <46503462+davelopez@users.noreply.github.com>
Date: Fri, 7 Mar 2025 14:13:25 +0100
Subject: [PATCH 1/5] Add "Save" workflow activity in editor
---
.../components/Workflow/Editor/modules/activities.ts | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/client/src/components/Workflow/Editor/modules/activities.ts b/client/src/components/Workflow/Editor/modules/activities.ts
index 365bbba411d..2d025509aa2 100644
--- a/client/src/components/Workflow/Editor/modules/activities.ts
+++ b/client/src/components/Workflow/Editor/modules/activities.ts
@@ -98,7 +98,17 @@ export const workflowEditorActivities = [
optional: true,
},
{
- description: "Save this workflow with a different name and annotation",
+ description: "Save this workflow.",
+ icon: faSave,
+ id: "save-workflow",
+ title: "Save",
+ tooltip: "Save current changes",
+ visible: true,
+ click: true,
+ optional: true,
+ },
+ {
+ description: "Save this workflow with a different name and annotation.",
icon: farSave,
id: "save-workflow-as",
title: "Save as",
From 161146284e30d87bdf9d52af3461597a55f39d2d Mon Sep 17 00:00:00 2001
From: davelopez <46503462+davelopez@users.noreply.github.com>
Date: Fri, 7 Mar 2025 14:19:52 +0100
Subject: [PATCH 2/5] Refactor save button placement in workflow editor
- Move the save button to the top right corner of the editor and make it always visible
---
client/src/components/Workflow/Editor/Index.vue | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/client/src/components/Workflow/Editor/Index.vue b/client/src/components/Workflow/Editor/Index.vue
index 287d227488e..09d318314fd 100644
--- a/client/src/components/Workflow/Editor/Index.vue
+++ b/client/src/components/Workflow/Editor/Index.vue
@@ -129,15 +129,6 @@
{{ name }}
(unsaved changes)
-
-
-
@@ -154,6 +145,14 @@
@click="undoRedoStore.redo()">
+
+
+
Date: Fri, 7 Mar 2025 15:07:09 +0100
Subject: [PATCH 3/5] Disable save button when there are no changes
---
client/src/components/Workflow/Editor/Index.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/client/src/components/Workflow/Editor/Index.vue b/client/src/components/Workflow/Editor/Index.vue
index 09d318314fd..cf098e8b0ad 100644
--- a/client/src/components/Workflow/Editor/Index.vue
+++ b/client/src/components/Workflow/Editor/Index.vue
@@ -149,6 +149,7 @@
id="workflow-save-button"
class="py-1 px-2"
variant="link"
+ :disabled="!hasChanges"
:title="saveWorkflowTitle"
@click="saveOrCreate">
From 28feab531396f63000fbe7bd2d7888b831275630 Mon Sep 17 00:00:00 2001
From: davelopez <46503462+davelopez@users.noreply.github.com>
Date: Fri, 7 Mar 2025 17:05:59 +0100
Subject: [PATCH 4/5] Adapt selenium tests for workflow editor
Do not expect the save button to disappear when the workflow is saved
---
lib/galaxy_test/selenium/framework.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/galaxy_test/selenium/framework.py b/lib/galaxy_test/selenium/framework.py
index d9cdb995a38..9c300dc7b0d 100644
--- a/lib/galaxy_test/selenium/framework.py
+++ b/lib/galaxy_test/selenium/framework.py
@@ -455,7 +455,6 @@ class TestWithSeleniumMixin(GalaxyTestSeleniumContext, UsesApiTestCaseMixin, Use
save_button.wait_for_visible()
assert not save_button.has_class("disabled")
save_button.wait_for_and_click()
- save_button.wait_for_absent()
self.sleep_for(self.wait_types.UX_RENDER)
@retry_assertion_during_transitions
From 7719a5e38d0aa23f5c48394ababd1430c7b5e6dc Mon Sep 17 00:00:00 2001
From: davelopez <46503462+davelopez@users.noreply.github.com>
Date: Fri, 7 Mar 2025 18:58:55 +0100
Subject: [PATCH 5/5] Update save button assertion in workflow editor tests to
check for disabled state
---
lib/galaxy_test/selenium/test_workflow_editor.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/galaxy_test/selenium/test_workflow_editor.py b/lib/galaxy_test/selenium/test_workflow_editor.py
index 5e1f37e2a98..2593e8f33ea 100644
--- a/lib/galaxy_test/selenium/test_workflow_editor.py
+++ b/lib/galaxy_test/selenium/test_workflow_editor.py
@@ -44,7 +44,7 @@ class TestWorkflowEditor(SeleniumTestCase, RunsWorkflows):
# shouldn't have changes on fresh load
save_button = self.components.workflow_editor.save_button
- assert save_button.is_absent
+ save_button.assert_disabled()
self.screenshot("workflow_editor_blank")