Files
windmill/frontend/src/lib/components/flows/content/FlowModuleDebounce.svelte
T
0249bb94ac refactor: harmonize flow and script settings layout (#12013)
* refactor: harmonize flow and script settings layout

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: keep the priority input open while it is edited

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: keep settings rows open while edited and name the deploying user for non-admins

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: write a setting before its row opens and show its real state while edited

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: slide settings rows open to their full height

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: remount a settings row's fields when its toggle turns it on

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: put the AI prompt behind a settings toggle

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat: summarize active runtime and permission settings on the metadata tab

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor: move the active settings chips into the settings header

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: bring back the active setting icons on the settings tabs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
2026-10-27 01:24:09 +01:00

59 lines
1.9 KiB
Svelte

<script lang="ts">
import type { FlowModule } from '$lib/gen'
import type { FlowEditorContext } from '../types'
import { getContext } from 'svelte'
import DebounceLimit from '../DebounceLimit.svelte'
let {
flowModule = $bindable(),
selectedId
}: {
flowModule: FlowModule
selectedId: string
} = $props()
const { flowStateStore } = getContext<FlowEditorContext>('FlowEditorContext')
let debounce_delay_s = $state(flowModule.debouncing?.debounce_delay_s)
let debounce_key = $state(flowModule.debouncing?.debounce_key)
let debounce_args_to_accumulate = $state(flowModule.debouncing?.debounce_args_to_accumulate)
let max_total_debouncing_time = $state(flowModule.debouncing?.max_total_debouncing_time)
let max_total_debounces_amount = $state(flowModule.debouncing?.max_total_debounces_amount)
// Re-sync local state when flowModule identity changes (e.g. switching selected module)
$effect(() => {
// Reading flowModule.id to track identity changes
flowModule.id
debounce_delay_s = flowModule.debouncing?.debounce_delay_s
debounce_key = flowModule.debouncing?.debounce_key
debounce_args_to_accumulate = flowModule.debouncing?.debounce_args_to_accumulate
max_total_debouncing_time = flowModule.debouncing?.max_total_debouncing_time
max_total_debounces_amount = flowModule.debouncing?.max_total_debounces_amount
})
// Write back to flowModule when local state changes
$effect(() => {
if (debounce_delay_s !== undefined && debounce_delay_s > 0) {
flowModule.debouncing = {
debounce_delay_s,
debounce_key,
debounce_args_to_accumulate,
max_total_debouncing_time,
max_total_debounces_amount
}
} else {
flowModule.debouncing = undefined
}
})
</script>
<DebounceLimit
bind:debounce_delay_s
bind:debounce_key
bind:debounce_args_to_accumulate
bind:max_total_debouncing_time
bind:max_total_debounces_amount
schema={flowStateStore.val[selectedId]?.schema}
placeholder={`$workspace/flow/<flow_path>-${flowModule.id}`}
/>