-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(tag-dropdown): added start block to tag dropdown by default #1922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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' | ||||||||||||||
|
Comment on lines
+955
to
+957
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: use constant
Suggested change
Prompt To Fix With AIThis is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx
Line: 955:957
Comment:
**style:** use constant `TRIGGER_TYPES.START` instead of string literal
```suggestion
const shouldShowRootTag =
accessibleBlock.type === TRIGGER_TYPES.GENERIC_WEBHOOK ||
accessibleBlock.type === TRIGGER_TYPES.START
```
How can I resolve this? If you propose a fix, please make it concise. |
||||||||||||||
| if (!shouldShowRootTag) { | ||||||||||||||
| blockTags = blockTags.filter((tag) => tag !== normalizedBlockName) | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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' | ||||||||||||||
| ) | ||||||||||||||
|
Comment on lines
+30
to
+32
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: use constant
Suggested change
Prompt To Fix With AIThis is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes.ts
Line: 30:32
Comment:
**style:** use constant `TRIGGER_TYPES.START` instead of string literal. Import `TRIGGER_TYPES` from `@/lib/workflows/triggers`
```suggestion
const starterBlock = Object.values(blocks).find(
(block) => block.type === 'starter' || block.type === TRIGGER_TYPES.START
)
```
How can I resolve this? If you propose a fix, please make it concise. |
||||||||||||||
| if (starterBlock) { | ||||||||||||||
| accessibleIds.add(starterBlock.id) | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: use constant
TRIGGER_TYPES.STARTinstead of string literalPrompt To Fix With AI