From 2eccb9985edff40a751a7e9bbba4429e29d437f1 Mon Sep 17 00:00:00 2001 From: Anirudh Ramchandran Date: Sat, 21 Sep 2024 09:13:51 -0400 Subject: [PATCH] feat(NavBar): add tooltips and separators (#45) - Added tooltips to the navbar on all pages for better user guidance. - Included a specific tooltip for the "Rag Management" section in the navbar. - Reintroduced separators in the navbar for improved visual separation of sections. --- app/frontend/src/components/NavBar.tsx | 120 +++++++++++++++++++++---- 1 file changed, 101 insertions(+), 19 deletions(-) diff --git a/app/frontend/src/components/NavBar.tsx b/app/frontend/src/components/NavBar.tsx index dc587d97..dd2e88fe 100644 --- a/app/frontend/src/components/NavBar.tsx +++ b/app/frontend/src/components/NavBar.tsx @@ -8,7 +8,7 @@ import { NavigationMenuItem, NavigationMenuList, } from "./ui/navigation-menu"; -import { Home, BrainCog, BotMessageSquare, Notebook } from "lucide-react"; // Import BotMessageSquare +import { Home, BrainCog, BotMessageSquare, Notebook } from "lucide-react"; import ModeToggle from "./DarkModeToggle"; import HelpIcon from "./HelpIcon"; import { Separator } from "./ui/separator"; @@ -111,10 +111,25 @@ export default function NavBar() { to="/" className={({ isActive }) => getNavLinkClass(isActive)} > - - {!isChatUI && Home} + {isChatUI ? ( + + + + + +

Home

+
+
+ ) : ( + <> + + Home + + )} {!isChatUI && ( @@ -130,12 +145,28 @@ export default function NavBar() { to="/rag-management" className={({ isActive }) => getNavLinkClass(isActive)} > - - {!isChatUI && Rag Management} + {isChatUI ? ( + + + + + +

Rag Management

+
+
+ ) : ( + <> + + Rag Management + + )} + {!isChatUI && ( getNavLinkClass(isActive)} > - - {!isChatUI && Models Deployed} + {isChatUI ? ( + + + + + +

Models Deployed

+
+
+ ) : ( + <> + + Models Deployed + + )} {isChatUI && ( @@ -163,9 +209,16 @@ export default function NavBar() { to="/chat-ui" className={({ isActive }) => getNavLinkClass(isActive)} > - + + + + + +

Chat UI

+
+
)} @@ -216,9 +269,38 @@ export default function NavBar() { {isChatUI && (
- - - + + + +
+ +
+
+ +

Toggle Dark/Light Mode

+
+
+ + +
+ +
+
+ +

Reset Board

+
+
+ + +
+ +
+
+ +

Get Help

+
+
+
)}