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: add transparent border to prevent button size flickering (#30128)

Pleasure1234f08d847c2076
diff --git a/web/app/components/workflow-app/components/workflow-header/features-trigger.tsx b/web/app/components/workflow-app/components/workflow-header/features-trigger.tsx
index 1df6f10195b..13fc6a5ce05 100644
--- a/web/app/components/workflow-app/components/workflow-header/features-trigger.tsx
+++ b/web/app/components/workflow-app/components/workflow-header/features-trigger.tsx
@@ -188,8 +188,8 @@ const FeaturesTrigger = () => {
{isChatMode && (
<Button
className={cn(
- 'text-components-button-secondary-text',
- theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
+ 'rounded-lg border border-transparent text-components-button-secondary-text',
+ theme === 'dark' && 'border-black/5 bg-white/10 backdrop-blur-sm',
)}
onClick={handleShowFeatures}
>
diff --git a/web/app/components/workflow/header/chat-variable-button.tsx b/web/app/components/workflow/header/chat-variable-button.tsx
index 86c88969cac..c61db717577 100644
--- a/web/app/components/workflow/header/chat-variable-button.tsx
+++ b/web/app/components/workflow/header/chat-variable-button.tsx
@@ -23,8 +23,8 @@ const ChatVariableButton = ({ disabled }: { disabled: boolean }) => {
return (
<Button
className={cn(
- 'p-2',
- theme === 'dark' && showChatVariablePanel && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
+ 'rounded-lg border border-transparent p-2',
+ theme === 'dark' && showChatVariablePanel && 'border-black/5 bg-white/10 backdrop-blur-sm',
)}
disabled={disabled}
onClick={handleClick}
diff --git a/web/app/components/workflow/header/env-button.tsx b/web/app/components/workflow/header/env-button.tsx
index 12dc1932619..0690d58e79c 100644
--- a/web/app/components/workflow/header/env-button.tsx
+++ b/web/app/components/workflow/header/env-button.tsx
@@ -26,8 +26,8 @@ const EnvButton = ({ disabled }: { disabled: boolean }) => {
return (
<Button
className={cn(
- 'p-2',
- theme === 'dark' && showEnvPanel && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
+ 'rounded-lg border border-transparent p-2',
+ theme === 'dark' && showEnvPanel && 'border-black/5 bg-white/10 backdrop-blur-sm',
)}
variant="ghost"
disabled={disabled}
diff --git a/web/app/components/workflow/header/global-variable-button.tsx b/web/app/components/workflow/header/global-variable-button.tsx
index a2d78edc4b7..d098eaf31ae 100644
--- a/web/app/components/workflow/header/global-variable-button.tsx
+++ b/web/app/components/workflow/header/global-variable-button.tsx
@@ -26,8 +26,8 @@ const GlobalVariableButton = ({ disabled }: { disabled: boolean }) => {
return (
<Button
className={cn(
- 'p-2',
- theme === 'dark' && showGlobalVariablePanel && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
+ 'rounded-lg border border-transparent p-2',
+ theme === 'dark' && showGlobalVariablePanel && 'border-black/5 bg-white/10 backdrop-blur-sm',
)}
disabled={disabled}
onClick={handleClick}
diff --git a/web/app/components/workflow/header/header-in-restoring.tsx b/web/app/components/workflow/header/header-in-restoring.tsx
index 2abe031b61a..1b6a49e6e49 100644
--- a/web/app/components/workflow/header/header-in-restoring.tsx
+++ b/web/app/components/workflow/header/header-in-restoring.tsx
@@ -86,7 +86,8 @@ const HeaderInRestoring = ({
disabled={!currentVersion || currentVersion.version === WorkflowVersion.Draft}
variant="primary"
className={cn(
- theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
+ 'rounded-lg border border-transparent',
+ theme === 'dark' && 'border-black/5 bg-white/10 backdrop-blur-sm',
)}
>
{t('workflow.common.restore')}
@@ -94,8 +95,8 @@ const HeaderInRestoring = ({
<Button
onClick={handleCancelRestore}
className={cn(
- 'text-components-button-secondary-accent-text',
- theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
+ 'rounded-lg border border-transparent text-components-button-secondary-accent-text',
+ theme === 'dark' && 'border-black/5 bg-white/10 backdrop-blur-sm',
)}
>
<div className="flex items-center gap-x-0.5">
diff --git a/web/app/components/workflow/header/version-history-button.tsx b/web/app/components/workflow/header/version-history-button.tsx
index 3be0cfbe329..ae3bd68b48d 100644
--- a/web/app/components/workflow/header/version-history-button.tsx
+++ b/web/app/components/workflow/header/version-history-button.tsx
@@ -61,8 +61,8 @@ const VersionHistoryButton: FC<VersionHistoryButtonProps> = ({
>
<Button
className={cn(
- 'p-2',
- theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
+ 'p-2 rounded-lg border border-transparent',
+ theme === 'dark' && 'border-black/5 bg-white/10 backdrop-blur-sm',
)}
onClick={handleViewVersionHistory}
>