mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-21 08:02:26 +00:00
fix: make implicit groups (forloop, branches) expanded by default
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -251,8 +251,8 @@
|
||||
movingIds = undefined
|
||||
}: Props = $props()
|
||||
|
||||
// Runtime state for expanded containers (collapsed by default)
|
||||
let expandedContainers = $state<Set<string>>(new Set())
|
||||
// Runtime state for collapsed containers (expanded by default)
|
||||
let collapsedContainers = $state<Set<string>>(new Set())
|
||||
|
||||
// Initialize note manager with fine-grained reactivity
|
||||
const noteManager = new NoteManager(
|
||||
@@ -438,10 +438,10 @@
|
||||
groupEditorContext?.groupEditor.expandGroup(groupId)
|
||||
},
|
||||
expandContainer: (moduleId: string) => {
|
||||
expandedContainers = new Set([...expandedContainers, moduleId])
|
||||
collapsedContainers = new Set([...collapsedContainers].filter((id) => id !== moduleId))
|
||||
},
|
||||
collapseContainer: (moduleId: string) => {
|
||||
expandedContainers = new Set([...expandedContainers].filter((id) => id !== moduleId))
|
||||
collapsedContainers = new Set([...collapsedContainers, moduleId])
|
||||
},
|
||||
updateMock: (detail) => {
|
||||
onUpdateMock?.(detail)
|
||||
@@ -852,7 +852,7 @@
|
||||
triggerNode ? path : undefined,
|
||||
expandedSubflows,
|
||||
collapsedGroups,
|
||||
expandedContainers,
|
||||
collapsedContainers,
|
||||
showNotes
|
||||
)
|
||||
})
|
||||
|
||||
@@ -412,7 +412,7 @@ export function graphBuilder(
|
||||
collapsed?: boolean
|
||||
module_ids: string[]
|
||||
}>,
|
||||
expandedContainers: Set<string>,
|
||||
collapsedContainers: Set<string>,
|
||||
showNotes: boolean
|
||||
// triggerProps?: {
|
||||
// path?: string
|
||||
@@ -738,7 +738,7 @@ export function graphBuilder(
|
||||
module.value.type === 'branchone' ||
|
||||
module.value.type === 'forloopflow' ||
|
||||
module.value.type === 'whileloopflow'
|
||||
if (isContainer && !expandedContainers.has(module.id)) {
|
||||
if (isContainer && collapsedContainers.has(module.id)) {
|
||||
const containerModules = getContainerModules(module)
|
||||
addNode(module, { isCollapsedContainer: true, containerModules })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user