Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: workflow if-else node variable tag style (#16583)

zxhlyh17b4d4c7b269
diff --git a/web/app/components/workflow/nodes/if-else/components/condition-list/condition-var-selector.tsx b/web/app/components/workflow/nodes/if-else/components/condition-list/condition-var-selector.tsx
index 4cb82b4ce93..c05e733c1af 100644
--- a/web/app/components/workflow/nodes/if-else/components/condition-list/condition-var-selector.tsx
+++ b/web/app/components/workflow/nodes/if-else/components/condition-list/condition-var-selector.tsx
@@ -32,8 +32,8 @@ const ConditionVarSelector = ({
crossAxis: 0,
}}
>
- <PortalToFollowElemTrigger onClick={() => onOpenChange(!open)}>
- <div className="cursor-pointer">
+ <PortalToFollowElemTrigger asChild onClick={() => onOpenChange(!open)}>
+ <div className="w-full cursor-pointer">
<VariableTag
valueSelector={valueSelector}
varType={varType}
diff --git a/web/app/components/workflow/nodes/if-else/components/condition-value.tsx b/web/app/components/workflow/nodes/if-else/components/condition-value.tsx
index ca448e9bf2b..53dac65217a 100644
--- a/web/app/components/workflow/nodes/if-else/components/condition-value.tsx
+++ b/web/app/components/workflow/nodes/if-else/components/condition-value.tsx
@@ -78,11 +78,11 @@ const ConditionValue = ({
<div className='flex h-6 items-center rounded-md bg-workflow-block-parma-bg px-1'>
{!isEnvVar && !isChatVar && <Variable02 className={cn('mr-1 h-3.5 w-3.5 shrink-0 text-text-accent', isException && 'text-text-warning')} />}
{isEnvVar && <Env className='mr-1 h-3.5 w-3.5 shrink-0 text-util-colors-violet-violet-600' />}
- {isChatVar && <BubbleX className='h-3.5 w-3.5 text-util-colors-teal-teal-700' />}
+ {isChatVar && <BubbleX className='h-3.5 w-3.5 shrink-0 text-util-colors-teal-teal-700' />}
<div
className={cn(
- 'ml-0.5 shrink-0 truncate text-xs font-medium text-text-accent',
+ 'ml-0.5 shrink-[2] truncate text-xs font-medium text-text-accent',
!notHasValue && 'max-w-[70px]',
isException && 'text-text-warning',
)}
@@ -98,7 +98,7 @@ const ConditionValue = ({
</div>
{
!notHasValue && (
- <div className='truncate text-xs text-text-secondary' title={formatValue}>{isSelect ? selectName : formatValue}</div>
+ <div className='shrink-[3] truncate text-xs text-text-secondary' title={formatValue}>{isSelect ? selectName : formatValue}</div>
)
}
</div>