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.

refactor(web): let layouts own viewport height instead of root h-full chain (#44143)

yyh59b6b7f753fb
diff --git a/packages/dify-ui/docs/overlays.md b/packages/dify-ui/docs/overlays.md
index 72da316182a..eba57c8481e 100644
--- a/packages/dify-ui/docs/overlays.md
+++ b/packages/dify-ui/docs/overlays.md
@@ -33,7 +33,7 @@ The host must establish an isolated stacking context at its application root:
```tsx
<body>
- <div className="isolate h-full">{children}</div>
+ <div className="isolate">{children}</div>
</body>
```
diff --git a/web/app/(commonLayout)/layout.tsx b/web/app/(commonLayout)/layout.tsx
index c2eed0a2818..d766d6ddaf8 100644
--- a/web/app/(commonLayout)/layout.tsx
+++ b/web/app/(commonLayout)/layout.tsx
@@ -14,7 +14,7 @@ export default async function Layout({
return (
<React.Fragment>
<ConsoleRuntimeProviders>
- <div className="flex h-full flex-col overflow-hidden">
+ <div className="flex h-dvh flex-col overflow-hidden">
<ConsoleContextProviders>
<MainNavLayout detailSidebar={detailSidebar}>{children}</MainNavLayout>
<CommonLayoutGlobalMounts />
diff --git a/web/app/(humanInputLayout)/form/[token]/page.tsx b/web/app/(humanInputLayout)/form/[token]/page.tsx
index db7952ef1a9..cefc1b71de2 100644
--- a/web/app/(humanInputLayout)/form/[token]/page.tsx
+++ b/web/app/(humanInputLayout)/form/[token]/page.tsx
@@ -4,7 +4,7 @@ import FormContent from './form'
const FormPage = () => {
return (
- <div className="h-full min-w-75 bg-chatbot-bg pb-[env(safe-area-inset-bottom)]">
+ <div className="h-dvh min-w-75 bg-chatbot-bg pb-[env(safe-area-inset-bottom)]">
<FormContent />
</div>
)
diff --git a/web/app/(shareLayout)/layout.tsx b/web/app/(shareLayout)/layout.tsx
index 0e3c180392b..73866058d6f 100644
--- a/web/app/(shareLayout)/layout.tsx
+++ b/web/app/(shareLayout)/layout.tsx
@@ -4,7 +4,7 @@ import Splash from './components/splash'
const Layout: FC<PropsWithChildren> = ({ children }) => {
return (
- <div className="h-full min-w-75 pb-[env(safe-area-inset-bottom)]">
+ <div className="h-dvh min-w-75 pb-[env(safe-area-inset-bottom)]">
<WebAppStoreProvider>
<Splash>{children}</Splash>
</WebAppStoreProvider>
diff --git a/web/app/account/(commonLayout)/layout.tsx b/web/app/account/(commonLayout)/layout.tsx
index 0e323e98798..519c6e74b35 100644
--- a/web/app/account/(commonLayout)/layout.tsx
+++ b/web/app/account/(commonLayout)/layout.tsx
@@ -7,7 +7,7 @@ export default async function Layout({ children }: { children: React.ReactNode }
return (
<React.Fragment>
<ConsoleRuntimeProviders>
- <div className="flex h-full flex-col overflow-hidden bg-background-body">
+ <div className="flex h-dvh flex-col overflow-hidden bg-background-body">
<ConsoleContextProviders>
<HeaderWrapper>
<Header />
diff --git a/web/app/education/education-shell.tsx b/web/app/education/education-shell.tsx
index d83ab86e3a0..181ce566323 100644
--- a/web/app/education/education-shell.tsx
+++ b/web/app/education/education-shell.tsx
@@ -15,7 +15,7 @@ export default function EducationShell({ children }: EducationShellProps) {
useDocumentTitle(pageTitle)
return (
- <main className="h-full overflow-y-auto bg-background-body p-6">
+ <main className="min-h-dvh bg-background-body p-6">
<div className="mx-auto w-full max-w-352 rounded-2xl border border-effects-highlight bg-background-default-subtle">
<div
className="h-87.25 w-full overflow-hidden rounded-t-2xl bg-cover bg-center bg-no-repeat"
diff --git a/web/app/layout.tsx b/web/app/layout.tsx
index cc7e3e59c66..c3f69c21e8d 100644
--- a/web/app/layout.tsx
+++ b/web/app/layout.tsx
@@ -67,13 +67,13 @@ export default async function RootLayout({ children }: { children: React.ReactNo
if (nonce !== undefined) themeProviderProps.nonce = nonce
return (
- <html lang={locale} className="h-full" suppressHydrationWarning>
+ <html lang={locale} suppressHydrationWarning>
<head>
<ReactScanLoader />
</head>
- <body className="h-full bg-background-body" {...datasetMap}>
+ <body className="bg-background-body" {...datasetMap}>
<CloudAnalytics />
- <div className="isolate h-full">
+ <div className="isolate">
<JotaiProvider>
<ThemeProvider {...themeProviderProps}>
<NuqsAdapter>