From eaddd4a132dee27d5277a3b8160b3edf7eda8b2f Mon Sep 17 00:00:00 2001 From: Coding On Star <447357187@qq.com> Date: Fri, 17 Apr 2026 15:27:22 +0800 Subject: [PATCH] fix(web): stabilize workflow node panel operator dropdown trigger (#35352) Signed-off-by: dependabot[bot] Co-authored-by: CodingOnStar Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: yyh Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: jerryzai Co-authored-by: NVIDIAN Co-authored-by: ai-hpc Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com> Co-authored-by: Asuka Minato Co-authored-by: Junghwan <70629228+shaun0927@users.noreply.github.com> Co-authored-by: HeYinKazune <70251095+HeYin-OS@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- eslint-suppressions.json | 5 ---- .../nodes/_base/components/node-control.tsx | 21 ++++++++++------ .../_base/components/panel-operator/index.tsx | 24 ++++++++++--------- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/eslint-suppressions.json b/eslint-suppressions.json index 763d94af9a..173a3a7bd7 100644 --- a/eslint-suppressions.json +++ b/eslint-suppressions.json @@ -4679,11 +4679,6 @@ "count": 1 } }, - "web/app/components/workflow/nodes/_base/components/node-control.tsx": { - "no-restricted-imports": { - "count": 1 - } - }, "web/app/components/workflow/nodes/_base/components/node-handle.tsx": { "react/set-state-in-effect": { "count": 1 diff --git a/web/app/components/workflow/nodes/_base/components/node-control.tsx b/web/app/components/workflow/nodes/_base/components/node-control.tsx index aab4b5065d..547d0b1daa 100644 --- a/web/app/components/workflow/nodes/_base/components/node-control.tsx +++ b/web/app/components/workflow/nodes/_base/components/node-control.tsx @@ -9,7 +9,11 @@ import { useTranslation } from 'react-i18next' import { Stop, } from '@/app/components/base/icons/src/vender/line/mediaAndDevices' -import Tooltip from '@/app/components/base/tooltip' +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from '@/app/components/base/ui/tooltip' import { useWorkflowStore } from '@/app/components/workflow/store' import { useNodesInteractions, @@ -46,7 +50,8 @@ const NodeControl: FC = ({ `} >
e.stopPropagation()} onClick={e => e.stopPropagation()} > { @@ -71,11 +76,13 @@ const NodeControl: FC = ({ isSingleRunning ? : ( - - + + } + /> + + {t('panel.runThisStep', { ns: 'workflow' })} + ) } diff --git a/web/app/components/workflow/nodes/_base/components/panel-operator/index.tsx b/web/app/components/workflow/nodes/_base/components/panel-operator/index.tsx index 2109365d75..7b3469aaba 100644 --- a/web/app/components/workflow/nodes/_base/components/panel-operator/index.tsx +++ b/web/app/components/workflow/nodes/_base/components/panel-operator/index.tsx @@ -1,10 +1,12 @@ import type { OffsetOptions } from '@floating-ui/react' import type { Node } from '@/app/components/workflow/types' +import { cn } from '@langgenius/dify-ui/cn' import { memo, useCallback, useState, } from 'react' +import { useTranslation } from 'react-i18next' import { DropdownMenu, DropdownMenuContent, @@ -32,6 +34,7 @@ const PanelOperator = ({ onOpenChange, showHelpLink = true, }: PanelOperatorProps) => { + const { t } = useTranslation() const [open, setOpen] = useState(false) const sideOffset = typeof offset === 'number' ? offset @@ -54,17 +57,16 @@ const PanelOperator = ({ open={open} onOpenChange={handleOpenChange} > - }> -
- -
+ } + aria-label={t('operation.more', { ns: 'common' })} + className={cn( + 'nodrag nopan nowheel flex h-6 w-6 cursor-pointer items-center justify-center rounded-md hover:bg-state-base-hover', + open && 'bg-state-base-hover', + triggerClassName, + )} + > +