mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-23 16:00:38 +00:00
feat: add clickable step count to toggle group collapse/expand
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
showNote?: boolean
|
||||
editMode?: boolean
|
||||
modules?: FlowModule[]
|
||||
onExpand?: () => void
|
||||
onSummaryUpdate?: (text: string) => void
|
||||
onNoteUpdate?: (text: string) => void
|
||||
onHeightChange?: (height: number) => void
|
||||
@@ -34,6 +35,7 @@
|
||||
showNote = false,
|
||||
editMode = false,
|
||||
modules,
|
||||
onExpand,
|
||||
onSummaryUpdate,
|
||||
onNoteUpdate,
|
||||
onHeightChange
|
||||
@@ -132,7 +134,13 @@
|
||||
>
|
||||
{/if}
|
||||
{#if stepCount != null}
|
||||
<span class="text-3xs opacity-60 ml-auto shrink-0 whitespace-nowrap"
|
||||
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<span
|
||||
class="text-3xs opacity-60 ml-auto shrink-0 whitespace-nowrap {onExpand
|
||||
? 'cursor-pointer hover:opacity-100 hover:text-blue-500 dark:hover:text-blue-400'
|
||||
: ''}"
|
||||
onclick={onExpand ? stopPropagation(preventDefault(onExpand)) : undefined}
|
||||
>{stepCount} node{stepCount !== 1 ? 's' : ''}</span
|
||||
>
|
||||
{/if}
|
||||
|
||||
@@ -155,6 +155,7 @@
|
||||
showNote={showNotes && group.note != null}
|
||||
{editMode}
|
||||
modules={getGroupModules(group)}
|
||||
onExpand={() => toggleCollapse(group.id)}
|
||||
onSummaryUpdate={(text) => groupEditorContext?.groupEditor.updateSummary(group.id, text)}
|
||||
onNoteUpdate={(text) => groupEditorContext?.groupEditor.updateNote(group.id, text)}
|
||||
onHeightChange={(h) => groupEditorContext?.groupEditor.setNoteHeight(group.id, h)}
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
showNote={data.showNotes && data.note != null}
|
||||
editMode={data.editMode}
|
||||
modules={data.modules}
|
||||
onExpand={() => data.eventHandlers.expandGroup(data.groupId)}
|
||||
onSummaryUpdate={(text) =>
|
||||
groupEditorContext?.groupEditor.updateSummary(data.groupId, text)}
|
||||
onNoteUpdate={(text) => groupEditorContext?.groupEditor.updateNote(data.groupId, text)}
|
||||
|
||||
Reference in New Issue
Block a user