From 7e7c0741d5427ab6fff7a8ce5864c0b29b27e8d0 Mon Sep 17 00:00:00 2001 From: mbeaulne Date: Wed, 25 Mar 2026 15:26:22 -0400 Subject: [PATCH] moves app footer --- src/components/Home/RunSection/RunRow.tsx | 10 +- src/components/layout/RootLayout.tsx | 6 +- src/routes/Dashboard/DashboardLayout.tsx | 166 ++++++++++++++-------- 3 files changed, 113 insertions(+), 69 deletions(-) diff --git a/src/components/Home/RunSection/RunRow.tsx b/src/components/Home/RunSection/RunRow.tsx index 5f3a5c78d..296210502 100644 --- a/src/components/Home/RunSection/RunRow.tsx +++ b/src/components/Home/RunSection/RunRow.tsx @@ -15,7 +15,6 @@ import { TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; -import { Paragraph } from "@/components/ui/typography"; import useToastNotification from "@/hooks/useToastNotification"; import { useBackend } from "@/providers/BackendProvider"; import { APP_ROUTES } from "@/routes/router"; @@ -95,14 +94,17 @@ const RunRow = ({ run }: { run: PipelineRunResponse }) => { return ( - + {name} - +
e.stopPropagation()} className="flex items-center text-sm" diff --git a/src/components/layout/RootLayout.tsx b/src/components/layout/RootLayout.tsx index d30a1fb9b..f01dced79 100644 --- a/src/components/layout/RootLayout.tsx +++ b/src/components/layout/RootLayout.tsx @@ -1,4 +1,4 @@ -import { Outlet } from "@tanstack/react-router"; +import { Outlet, useLocation } from "@tanstack/react-router"; import { TanStackRouterDevtools } from "@tanstack/router-devtools"; import { ToastContainer } from "react-toastify"; @@ -11,6 +11,8 @@ import AppMenu from "./AppMenu"; const RootLayout = () => { useDocumentTitle(); + const { pathname } = useLocation(); + const isDashboard = pathname.startsWith("/dashboard"); return ( @@ -24,7 +26,7 @@ const RootLayout = () => { - + {!isDashboard && } {import.meta.env.VITE_ENABLE_ROUTER_DEVTOOLS === "true" && ( diff --git a/src/routes/Dashboard/DashboardLayout.tsx b/src/routes/Dashboard/DashboardLayout.tsx index 551bef34d..e092354c3 100644 --- a/src/routes/Dashboard/DashboardLayout.tsx +++ b/src/routes/Dashboard/DashboardLayout.tsx @@ -4,9 +4,17 @@ import { isAuthorizationRequired } from "@/components/shared/Authentication/help import { TopBarAuthentication } from "@/components/shared/Authentication/TopBarAuthentication"; import { Icon, type IconName } from "@/components/ui/icon"; import { BlockStack, InlineStack } from "@/components/ui/layout"; -import { Heading, Text } from "@/components/ui/typography"; +import { Text } from "@/components/ui/typography"; import { cn } from "@/lib/utils"; -import { DOCUMENTATION_URL } from "@/utils/constants"; +import { + ABOUT_URL, + DOCUMENTATION_URL, + GIT_COMMIT, + GIT_REPO_URL, + GIVE_FEEDBACK_URL, + PRIVACY_POLICY_URL, + TOP_NAV_HEIGHT, +} from "@/utils/constants"; interface SidebarItem { to: string; @@ -32,76 +40,108 @@ export function DashboardLayout() { const requiresAuthorization = isAuthorizationRequired(); return ( -
- - - Dashboard - - Beta - - +
+ {/* Sidebar — fixed height, independent scroll */} +
+ {/* Dashboard heading */} +
+ + + Dashboard + + + Beta + + +
+ + + {SIDEBAR_ITEMS.map((item) => ( + + {({ isActive }) => ( +
+ + {item.label} +
+ )} + + ))} +
- - + + {/* Bottom utilities */} +
+ - {/* Top nav */} - - {SIDEBAR_ITEMS.map((item) => ( - - {({ isActive }) => ( -
- - {item.label} -
- )} - - ))} -
+ + Docs +
+ + {({ isActive }) => ( +
+ + Settings +
+ )} + + {requiresAuthorization && ( +
+ +
+ )} - {/* Bottom utilities */} - + {/* Footer links */} +
+ {[ + { label: "About", href: ABOUT_URL }, + { label: "Give feedback", href: GIVE_FEEDBACK_URL }, + { label: "Privacy policy", href: PRIVACY_POLICY_URL }, + ].map(({ label, href }) => ( - - Docs + {label} - - {({ isActive }) => ( -
- - Settings -
- )} - - {requiresAuthorization && ( -
- -
- )} - - + ))} + + ver: {GIT_COMMIT.substring(0, 6)} + +
+
+
- - - - - + {/* Main content — independent scroll */} +
+ +
); }