improvement(snapshot): show subblocks for trigger only blocks in frozen canvas (#2838)

* improvement(snapshot): show subblocks for trigger only blocks in frozen canvas

* ack comment
This commit is contained in:
Waleed
2026-01-15 10:34:38 -08:00
committed by GitHub
parent debcd76019
commit 5e44357b9f
2 changed files with 4 additions and 2 deletions

View File

@@ -1124,7 +1124,9 @@ function BlockDetailsSidebarContent({
const visibleSubBlocks = blockConfig.subBlocks.filter((subBlock) => {
if (subBlock.hidden || subBlock.hideFromPreview) return false
if (subBlock.mode === 'trigger') return false
// Only filter out trigger-mode subblocks for non-trigger blocks
// Trigger-only blocks (category 'triggers') should display their trigger subblocks
if (subBlock.mode === 'trigger' && blockConfig.category !== 'triggers') return false
if (subBlock.condition) {
return evaluateCondition(subBlock.condition, subBlockValues)
}

View File

@@ -46,7 +46,7 @@ function WorkflowPreviewBlockInner({ data }: NodeProps<WorkflowPreviewBlockData>
return blockConfig.subBlocks.filter((subBlock) => {
if (subBlock.hidden) return false
if (subBlock.hideFromPreview) return false
if (subBlock.mode === 'trigger') return false
if (subBlock.mode === 'trigger' && blockConfig.category !== 'triggers') return false
if (subBlock.mode === 'advanced') return false
return true
})