Skip to content

Commit 47fde8e

Browse files
committed
fix(input-mapping): resolve workflowId via canonical hook for advanced mode
1 parent bb15738 commit 47fde8e

6 files changed

Lines changed: 8 additions & 6 deletions

File tree

apps/sim/app/chat/components/message/components/markdown-renderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const COMPONENTS = {
115115
),
116116

117117
blockquote: ({ children }: React.HTMLAttributes<HTMLQuoteElement>) => (
118-
<blockquote className='my-4 break-words border-[var(--divider)] border-l-2 pl-4 font-sans text-[var(--text-primary)] italic [&>p]:my-2 [&>p:first-child]:mt-0 [&>p:last-child]:mb-0'>
118+
<blockquote className='my-4 break-words border-[var(--divider)] border-l-2 pl-4 font-sans text-[var(--text-primary)] italic [&>p:first-child]:mt-0 [&>p:last-child]:mb-0 [&>p]:my-2'>
119119
{children}
120120
</blockquote>
121121
),

apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-panel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ function CalloutBlock({ type, children }: { type: string; children?: React.React
263263
const config = CALLOUT_CONFIG[type]
264264
if (!config) {
265265
return (
266-
<blockquote className='my-4 break-words border-[var(--divider)] border-l-2 pl-4 text-[var(--text-primary)] italic [&>p]:my-2 [&>p:first-child]:mt-0 [&>p:last-child]:mb-0'>
266+
<blockquote className='my-4 break-words border-[var(--divider)] border-l-2 pl-4 text-[var(--text-primary)] italic [&>p:first-child]:mt-0 [&>p:last-child]:mb-0 [&>p]:my-2'>
267267
{children}
268268
</blockquote>
269269
)
@@ -605,7 +605,7 @@ const STATIC_MARKDOWN_COMPONENTS = {
605605
return <CalloutBlock type={calloutType}>{children}</CalloutBlock>
606606
}
607607
return (
608-
<blockquote className='my-4 break-words border-[var(--divider)] border-l-2 pl-4 text-[var(--text-primary)] italic [&>p]:my-2 [&>p:first-child]:mt-0 [&>p:last-child]:mb-0'>
608+
<blockquote className='my-4 break-words border-[var(--divider)] border-l-2 pl-4 text-[var(--text-primary)] italic [&>p:first-child]:mt-0 [&>p:last-child]:mb-0 [&>p]:my-2'>
609609
{children}
610610
</blockquote>
611611
)

apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ const MARKDOWN_COMPONENTS = {
224224
},
225225
blockquote({ children }: { children?: React.ReactNode }) {
226226
return (
227-
<blockquote className='my-4 break-words border-[var(--divider)] border-l-2 pl-4 text-[var(--text-primary)] italic [&>p]:my-2 [&>p:first-child]:mt-0 [&>p:last-child]:mb-0'>
227+
<blockquote className='my-4 break-words border-[var(--divider)] border-l-2 pl-4 text-[var(--text-primary)] italic [&>p:first-child]:mt-0 [&>p:last-child]:mb-0 [&>p]:my-2'>
228228
{children}
229229
</blockquote>
230230
)

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ const NOTE_COMPONENTS = {
430430
<em className='break-words text-[var(--text-tertiary)]'>{children}</em>
431431
),
432432
blockquote: ({ children }: { children?: React.ReactNode }) => (
433-
<blockquote className='my-4 break-words border-[var(--divider)] border-l-2 pl-4 text-[var(--text-primary)] italic [&>p]:my-2 [&>p:first-child]:mt-0 [&>p:last-child]:mb-0'>
433+
<blockquote className='my-4 break-words border-[var(--divider)] border-l-2 pl-4 text-[var(--text-primary)] italic [&>p:first-child]:mt-0 [&>p:last-child]:mb-0 [&>p]:my-2'>
434434
{children}
435435
</blockquote>
436436
),

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/input-mapping/input-mapping.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { handleKeyboardActivation } from '@/lib/core/utils/keyboard'
66
import { extractInputFieldsFromBlocks } from '@/lib/workflows/input-format'
77
import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text'
88
import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown'
9+
import { useCanonicalSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-canonical-sub-block-value'
910
import { useSubBlockInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-input'
1011
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
1112
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
@@ -57,7 +58,7 @@ export function InputMapping({
5758
previewContextValues,
5859
}: InputMappingProps) {
5960
const [mapping, setMapping] = useSubBlockValue(blockId, subBlockId)
60-
const [storeWorkflowId] = useSubBlockValue(blockId, 'workflowId')
61+
const storeWorkflowId = useCanonicalSubBlockValue<string>(blockId, 'workflowId')
6162
const selectedWorkflowId = previewContextValues
6263
? resolvePreviewContextValue(previewContextValues.workflowId)
6364
: storeWorkflowId

bun.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)