feat(tag-dropdown): added start block to tag dropdown by default (#1922)

This commit is contained in:
Waleed
2025-11-12 02:14:31 -08:00
committed by GitHub
parent e3e951832b
commit 1bd18ee85b
3 changed files with 11 additions and 4 deletions
@@ -639,7 +639,8 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
}
blockTags = ensureRootTag(blockTags, normalizedBlockName)
const shouldShowRootTag = sourceBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK
const shouldShowRootTag =
sourceBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK || sourceBlock.type === 'start_trigger'
if (!shouldShowRootTag) {
blockTags = blockTags.filter((tag) => tag !== normalizedBlockName)
}
@@ -951,7 +952,9 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
}
blockTags = ensureRootTag(blockTags, normalizedBlockName)
const shouldShowRootTag = accessibleBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK
const shouldShowRootTag =
accessibleBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK ||
accessibleBlock.type === 'start_trigger'
if (!shouldShowRootTag) {
blockTags = blockTags.filter((tag) => tag !== normalizedBlockName)
}
@@ -27,7 +27,9 @@ export function useAccessibleReferencePrefixes(blockId?: string | null): Set<str
const accessibleIds = new Set<string>(ancestorIds)
accessibleIds.add(blockId)
const starterBlock = Object.values(blocks).find((block) => block.type === 'starter')
const starterBlock = Object.values(blocks).find(
(block) => block.type === 'starter' || block.type === 'start_trigger'
)
if (starterBlock) {
accessibleIds.add(starterBlock.id)
}
+3 -1
View File
@@ -36,7 +36,9 @@ function normalizeInputFormatValue(inputFormatValue: any): InputFormatField[] {
return []
}
return inputFormatValue.filter((field) => field && typeof field === 'object')
return inputFormatValue.filter(
(field) => field && typeof field === 'object' && field.name && field.name.trim() !== ''
)
}
function applyInputFormatFields(