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(web): fix tool item text not vertically centered in block selector (#33148)

yyhf2d3feca6682
diff --git a/web/app/components/workflow/block-selector/tool/action-item.tsx b/web/app/components/workflow/block-selector/tool/action-item.tsx
index 4ffa99b05db..359cd5360d5 100644
--- a/web/app/components/workflow/block-selector/tool/action-item.tsx
+++ b/web/app/components/workflow/block-selector/tool/action-item.tsx
@@ -111,11 +111,11 @@ const ToolItem: FC<Props> = ({
})
}}
>
- <div className={cn('system-sm-medium h-8 truncate border-l-2 border-divider-subtle pl-4 leading-8 text-text-secondary')}>
+ <div className={cn('truncate border-l-2 border-divider-subtle py-2 pl-4 text-text-secondary system-sm-medium')}>
<span className={cn(disabled && 'opacity-30')}>{payload.label[language]}</span>
</div>
{isAdded && (
- <div className="system-xs-regular mr-4 text-text-tertiary">{t('addToolModal.added', { ns: 'tools' })}</div>
+ <div className="mr-4 text-text-tertiary system-xs-regular">{t('addToolModal.added', { ns: 'tools' })}</div>
)}
</div>
</Tooltip>
diff --git a/web/app/components/workflow/block-selector/trigger-plugin/action-item.tsx b/web/app/components/workflow/block-selector/trigger-plugin/action-item.tsx
index 5d47534da5b..38ad4951eaf 100644
--- a/web/app/components/workflow/block-selector/trigger-plugin/action-item.tsx
+++ b/web/app/components/workflow/block-selector/trigger-plugin/action-item.tsx
@@ -77,11 +77,11 @@ const TriggerPluginActionItem: FC<Props> = ({
})
}}
>
- <div className={cn('system-sm-medium h-8 truncate border-l-2 border-divider-subtle pl-4 leading-8 text-text-secondary')}>
+ <div className={cn('truncate border-l-2 border-divider-subtle py-2 pl-4 text-text-secondary system-sm-medium')}>
<span className={cn(disabled && 'opacity-30')}>{payload.label[language]}</span>
</div>
{isAdded && (
- <div className="system-xs-regular mr-4 text-text-tertiary">{t('addToolModal.added', { ns: 'tools' })}</div>
+ <div className="mr-4 text-text-tertiary system-xs-regular">{t('addToolModal.added', { ns: 'tools' })}</div>
)}
</div>
</Tooltip>
diff --git a/web/eslint-suppressions.json b/web/eslint-suppressions.json
index 3aec0ae56fa..1bfa47577db 100644
--- a/web/eslint-suppressions.json
+++ b/web/eslint-suppressions.json
@@ -6554,9 +6554,6 @@
"app/components/workflow/block-selector/tool/action-item.tsx": {
"no-restricted-imports": {
"count": 1
- },
- "tailwindcss/enforce-consistent-class-order": {
- "count": 2
}
},
"app/components/workflow/block-selector/tool/tool-list-flat-view/list.tsx": {
@@ -6576,9 +6573,6 @@
"no-restricted-imports": {
"count": 1
},
- "tailwindcss/enforce-consistent-class-order": {
- "count": 2
- },
"ts/no-explicit-any": {
"count": 1
}