-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Feature(UI): Canvas Workflow Integration - Run Workflow on Raster Layer #8665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feature(UI): Canvas Workflow Integration - Run Workflow on Raster Layer #8665
Conversation
This commit implements a new feature that allows users to run workflows directly from the unified canvas. Users can now: - Access a "Run Workflow" option from the canvas layer context menu - Select a workflow with image parameters from a modal dialog - Customize workflow parameters (non-image fields) - Execute the workflow with the current canvas layer as input - Have the result automatically added back to the canvas Key changes: - Added canvasWorkflowIntegrationSlice for state management - Created CanvasWorkflowIntegrationModal and related UI components - Added context menu item to raster layers - Integrated workflow execution with canvas image extraction - Added modal to global modal isolator This integration enhances the canvas by allowing users to leverage custom workflows for advanced image processing directly within the canvas workspace. Implements feature request for deeper workflow-canvas integration.
…-011CV36r1eKmax4DQhPyfiHf
- Extract WorkflowFieldRenderer component for individual field rendering - Add WorkflowFormPreview component to handle workflow parameter display - Remove workflow compatibility filtering - allow all workflows - Simplify workflow selector to use flattened workflow list - Add comprehensive field type support (String, Integer, Float, Boolean, Enum, Scheduler, Board, Model, Image, Color) - Implement image field selection UI with radio
- Add useFilteredWorkflows hook to filter workflows with ImageField inputs - Add workflowHasImageField utility to check for ImageField in Form Builder - Only show workflows that have Form Builder with at least one ImageField - Add loading state while filtering workflows - Improve error messages to clarify Form Builder requirement - Update modal description to mention Form Builder and parameter adjustment - Add fallback error message for workflows without Form Builder
…on state - Add _version field (v1) to canvasWorkflowIntegrationState for future migrations - Add persistConfig with migration function to handle version upgrades - Add persistDenylist to exclude transient state (isOpen, isProcessing, sourceEntityIdentifier) - Use es-toolkit isPlainObject and tsafe assert for type-safe migration - Persist selectedWorkflowId and fieldValues across sessions
|
This feature looks like an awesome addition to Invoke! Just from watching the video my only feedback would be to do away with that image checkbox and upload section, I think we can safely assume they're running that workflow on the image layer and don't need that extra semi-confusing step. Unless I'm missing something ofc. |
|
Some workflows can have more then one Image input so you need that selection Option. Maybe not if there is only one but this can be done later. |
Summary
This PR adds a new Canvas Workflow Integration feature that allows users to execute workflows directly on canvas layers.
Type: Feature
What: Adds a new modal dialog accessible from raster layer context menu that enables users to:
Why: This integration streamlines the workflow execution process for canvas-based operations, eliminating the need to manually export layers, run workflows separately, and re-import results.
How: The implementation includes:
canvasWorkflowIntegrationSliceRedux state managementRelated Issues / Discussions
QA Instructions
Setup:
Testing the feature:
Workflow selection:
Execution:
Edge cases:
Video Demo
Demo
Merge Plan
No special merge considerations. Standard merge to main is fine.
Checklist
What's Newcopy (if doing a release after this PR)