From 8d24fa9b721284fad10f5be3fb697321d0fd8f53 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Tue, 9 Jun 2026 09:16:59 -0700 Subject: [PATCH] fix: address mobile workflow PR feedback --- .changeset/mobile-workflow-editor.md | 2 +- .../app/components/WorkflowNodeEditor.css | 50 +++++++++++++++++-- .../app/components/WorkflowNodeEditor.tsx | 31 ++++++++++-- .../app/components/WorkflowSelector.css | 6 --- .../__tests__/WorkflowNodeEditor.test.tsx | 34 +++++++++++++ .../app/components/workflow-mobile-graph.ts | 23 +++++++-- 6 files changed, 126 insertions(+), 20 deletions(-) diff --git a/.changeset/mobile-workflow-editor.md b/.changeset/mobile-workflow-editor.md index d5ac020339..684dfb69a8 100644 --- a/.changeset/mobile-workflow-editor.md +++ b/.changeset/mobile-workflow-editor.md @@ -1,5 +1,5 @@ --- -"@runfusion/fusion": patch +"@runfusion/fusion": minor --- Redesign the workflow editor mobile surface with a graph outline, mobile add flow, and first-class workflow settings destinations. diff --git a/packages/dashboard/app/components/WorkflowNodeEditor.css b/packages/dashboard/app/components/WorkflowNodeEditor.css index dd088e1fce..65c1876068 100644 --- a/packages/dashboard/app/components/WorkflowNodeEditor.css +++ b/packages/dashboard/app/components/WorkflowNodeEditor.css @@ -549,6 +549,48 @@ display: none; } +.wf-layout-toggle { + display: inline-flex; + align-items: center; + gap: var(--space-xs); + width: fit-content; + min-height: 30px; + padding: var(--space-xs) var(--space-sm); + border: 1px solid var(--border); + border-radius: var(--radius-sm); + background: var(--bg-secondary); + color: var(--text-muted); + font: inherit; + font-size: 0.8rem; + cursor: pointer; +} + +.wf-layout-toggle:hover { + background: var(--bg-tertiary); + color: var(--text); +} + +.wf-layout-toggle:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 2px; +} + +.wf-editor-body--simple-layout :where(.wf-editor-readonly-banner), +.wf-editor-body--simple-layout :where(.wf-editor-toolbar), +.wf-editor-body--simple-layout :where(.wf-templates), +.wf-editor-body--simple-layout :where(.wf-editor-canvas) { + display: none; +} + +.wf-editor-body--simple-layout .wf-mobile-shell { + display: flex; + flex: 1 1 auto; + min-height: 0; + flex-direction: column; + border-top: 1px solid var(--border); + overflow: hidden; +} + .wf-editor-inspector { display: flex; flex-direction: column; @@ -1331,10 +1373,10 @@ overflow: hidden; } - .wf-editor-body--editor-stage .wf-editor-readonly-banner:not(.wf-mobile-shell), - .wf-editor-body--editor-stage .wf-editor-toolbar:not(.wf-mobile-shell), - .wf-editor-body--editor-stage .wf-templates:not(.wf-mobile-shell), - .wf-editor-body--editor-stage .wf-editor-canvas:not(.wf-mobile-shell) { + .wf-editor-body--editor-stage :where(.wf-editor-readonly-banner), + .wf-editor-body--editor-stage :where(.wf-editor-toolbar), + .wf-editor-body--editor-stage :where(.wf-templates), + .wf-editor-body--editor-stage :where(.wf-editor-canvas) { display: none; } diff --git a/packages/dashboard/app/components/WorkflowNodeEditor.tsx b/packages/dashboard/app/components/WorkflowNodeEditor.tsx index bcff30a1c4..0fe14d7ac8 100644 --- a/packages/dashboard/app/components/WorkflowNodeEditor.tsx +++ b/packages/dashboard/app/components/WorkflowNodeEditor.tsx @@ -693,9 +693,11 @@ function InnerEditor({ const [selectedNodeId, setSelectedNodeId] = useState(null); const [selectedEdgeId, setSelectedEdgeId] = useState(null); const [inspectorCollapsed, setInspectorCollapsed] = useState(false); + const [compactLayoutEnabled, setCompactLayoutEnabled] = useState(false); const [mobilePanel, setMobilePanel] = useState(() => initialPanel === "settings" ? "settings" : "graph", ); + const simpleLayoutEnabled = isMobileViewport || compactLayoutEnabled; const { t } = useTranslation("app"); const { confirm } = useConfirm(); // Create-workflow dialog (KTD-7) open state + focus-return ref to the @@ -2145,7 +2147,11 @@ function InnerEditor({ ) : null} -
+
- {isMobileViewport && ( + {simpleLayoutEnabled && (