feat(workflow): add relations panel to visualize dependencies (#21998)

Co-authored-by: crazywoola <427733928@qq.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
This commit is contained in:
Minamiyama
2025-08-05 15:08:23 +08:00
committed by GitHub
parent d080bea20b
commit 4934dbd0e6
10 changed files with 211 additions and 5 deletions

View File

@@ -25,6 +25,8 @@ export const useShortcuts = (): void => {
handleNodesDelete,
handleHistoryBack,
handleHistoryForward,
dimOtherNodes,
undimAllNodes,
} = useNodesInteractions()
const { handleStartWorkflowRun } = useWorkflowStartRun()
const { shortcutsEnabled: workflowHistoryShortcutsEnabled } = useWorkflowHistoryStore()
@@ -211,4 +213,35 @@ export const useShortcuts = (): void => {
exactMatch: true,
useCapture: true,
})
// Shift ↓
useKeyPress(
'shift',
(e) => {
console.log('Shift down', e)
if (shouldHandleShortcut(e))
dimOtherNodes()
},
{
exactMatch: true,
useCapture: true,
events: ['keydown'],
},
)
// Shift ↑
useKeyPress(
(e) => {
return e.key === 'Shift'
},
(e) => {
if (shouldHandleShortcut(e))
undimAllNodes()
},
{
exactMatch: true,
useCapture: true,
events: ['keyup'],
},
)
}