From db92ab230b7795c75cd112db398a6db2b7677c5c Mon Sep 17 00:00:00 2001 From: shine1i Date: Mon, 2 Feb 2026 15:25:15 +0100 Subject: [PATCH] refactor: enhance chat and UI elements with animations, tooltips, and improved styling; streamline sidebar, navbar, and chat-page interactions in top bar --- studio/frontend/src/app/routes/__root.tsx | 17 ++++- studio/frontend/src/components/navbar.tsx | 54 ++++++++++++---- .../frontend/src/features/chat/chat-page.tsx | 64 ++++++++++++++++--- .../src/features/chat/chat-settings-sheet.tsx | 2 +- studio/frontend/src/index.css | 4 +- 5 files changed, 114 insertions(+), 27 deletions(-) diff --git a/studio/frontend/src/app/routes/__root.tsx b/studio/frontend/src/app/routes/__root.tsx index 83863b7990..501399f907 100644 --- a/studio/frontend/src/app/routes/__root.tsx +++ b/studio/frontend/src/app/routes/__root.tsx @@ -4,6 +4,7 @@ import { createRootRoute, useRouterState, } from "@tanstack/react-router"; +import { AnimatePresence, motion } from "motion/react"; import { Suspense } from "react"; import { AppProvider } from "../provider"; @@ -20,9 +21,19 @@ function RootLayout() { return ( {!hideNavbar && } - - - + + + + + + + ); } diff --git a/studio/frontend/src/components/navbar.tsx b/studio/frontend/src/components/navbar.tsx index 6153a74cc3..aee6105cf3 100644 --- a/studio/frontend/src/components/navbar.tsx +++ b/studio/frontend/src/components/navbar.tsx @@ -5,8 +5,11 @@ import { } from "@/components/ui/hover-card"; import { cn } from "@/lib/utils"; import { + AiChat02Icon, + Analytics01Icon, ArrowRight01Icon, Book03Icon, + PackageIcon, ZapIcon, } from "@hugeicons/core-free-icons"; import { HugeiconsIcon } from "@hugeicons/react"; @@ -16,9 +19,9 @@ import { useState } from "react"; const NAV_ITEMS = [ { label: "Studio", href: "/studio", icon: ZapIcon, enabled: true }, - { label: "Evaluate", href: "/evaluate", enabled: false }, - { label: "Export", href: "/export", enabled: true }, - { label: "Chat", href: "/chat", enabled: true }, + { label: "Evaluate", href: "/evaluate", icon: Analytics01Icon, enabled: false }, + { label: "Export", href: "/export", icon: PackageIcon, enabled: true }, + { label: "Chat", href: "/chat", icon: AiChat02Icon, enabled: true }, ]; export function Navbar() { @@ -37,11 +40,11 @@ export function Navbar() { - + unsloth @@ -67,7 +70,7 @@ export function Navbar() { return ( {item.label} @@ -78,19 +81,44 @@ export function Navbar() { key={item.href} to={item.href} className={cn( - "rounded-full px-4 py-1.5 text-sm font-medium transition-colors", + "relative rounded-full px-4 py-1.5 text-sm font-medium transition-colors", active - ? "bg-foreground text-background" + ? "text-background" : "text-muted-foreground hover:text-foreground", )} > - {"icon" in item && item.icon && ( - )} - {item.label} + + + {active && item.icon && ( + + + + )} + + {item.label} + ); })} diff --git a/studio/frontend/src/features/chat/chat-page.tsx b/studio/frontend/src/features/chat/chat-page.tsx index 6de42ed671..3fa5e05685 100644 --- a/studio/frontend/src/features/chat/chat-page.tsx +++ b/studio/frontend/src/features/chat/chat-page.tsx @@ -3,13 +3,23 @@ import { ModelSelector, } from "@/components/assistant-ui/model-selector"; import { Thread } from "@/components/assistant-ui/thread"; +import { Button } from "@/components/ui/button"; import { SidebarProvider, SidebarTrigger, useSidebar, } from "@/components/ui/sidebar"; +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; -import { Settings04Icon } from "@hugeicons/core-free-icons"; +import { + ColumnInsertIcon, + PencilEdit02Icon, + Settings04Icon, +} from "@hugeicons/core-free-icons"; import { HugeiconsIcon } from "@hugeicons/react"; import { type CSSProperties, @@ -176,7 +186,7 @@ function InlineSidebar({