From 68f03214049f1f5f61a8625ddd9aa0dd4d36b512 Mon Sep 17 00:00:00 2001 From: Shine1i Date: Tue, 17 Feb 2026 21:27:02 +0100 Subject: [PATCH] style: improve layout consistency and responsiveness across components - Adjusted padding, spacing, and grid configurations for better alignment and scaling across screen sizes. - Enhanced mobile responsiveness by updating flex and grid layouts, ensuring optimal display on smaller devices. - Tuned container dimensions and card styling to maintain design consistency. --- .../assistant-ui/model-selector.tsx | 5 +- studio/frontend/src/components/navbar.tsx | 102 ++++++++++++++++-- .../frontend/src/features/auth/login-page.tsx | 4 +- .../src/features/auth/signup-page.tsx | 4 +- .../frontend/src/features/chat/chat-page.tsx | 40 +++++-- .../src/features/export/export-page.tsx | 6 +- .../onboarding/components/wizard-content.tsx | 10 +- .../onboarding/components/wizard-layout.tsx | 4 +- .../onboarding/components/wizard-sidebar.tsx | 13 ++- .../studio/sections/dataset-section.tsx | 4 +- .../studio/sections/model-section.tsx | 4 +- .../studio/sections/params-section.tsx | 4 +- .../studio/sections/training-section.tsx | 4 +- .../src/features/studio/studio-page.tsx | 6 +- 14 files changed, 163 insertions(+), 47 deletions(-) diff --git a/studio/frontend/src/components/assistant-ui/model-selector.tsx b/studio/frontend/src/components/assistant-ui/model-selector.tsx index 33dea79627..bf5f219558 100644 --- a/studio/frontend/src/components/assistant-ui/model-selector.tsx +++ b/studio/frontend/src/components/assistant-ui/model-selector.tsx @@ -112,7 +112,10 @@ function ModelSelectorContent({ diff --git a/studio/frontend/src/components/navbar.tsx b/studio/frontend/src/components/navbar.tsx index 28fc80499c..6a8fd5d7ca 100644 --- a/studio/frontend/src/components/navbar.tsx +++ b/studio/frontend/src/components/navbar.tsx @@ -3,6 +3,13 @@ import { HoverCardContent, HoverCardTrigger, } from "@/components/ui/hover-card"; +import { + Sheet, + SheetContent, + SheetHeader, + SheetTitle, + SheetTrigger, +} from "@/components/ui/sheet"; import { cn } from "@/lib/utils"; import { AiChat02Icon, @@ -29,6 +36,7 @@ const NAV_ITEMS = [ export function Navbar() { const pathname = useRouterState({ select: (s) => s.location.pathname }); const [logoHovered, setLogoHovered] = useState(false); + const [mobileOpen, setMobileOpen] = useState(false); const tourId = pathname === "/studio" @@ -39,9 +47,16 @@ export function Navbar() { ? "export" : null; + const openTour = () => { + if (!tourId) return; + window.dispatchEvent( + new CustomEvent(TOUR_OPEN_EVENT, { detail: { id: tourId } }), + ); + }; + return (
-
+
{/* Left: logo */}
- + unsloth @@ -76,7 +91,7 @@ export function Navbar() { {/* Center: pill nav */} - {/* Right: docs link */} -
+ {/* Right: docs/tour desktop */} + + + {/* Right: mobile */} +
); diff --git a/studio/frontend/src/features/auth/login-page.tsx b/studio/frontend/src/features/auth/login-page.tsx index beac1ce8e6..b6ccfe0c1c 100644 --- a/studio/frontend/src/features/auth/login-page.tsx +++ b/studio/frontend/src/features/auth/login-page.tsx @@ -4,7 +4,7 @@ import { AuthForm } from "./components/auth-form"; export function LoginPage() { return ( -
+
- +
diff --git a/studio/frontend/src/features/auth/signup-page.tsx b/studio/frontend/src/features/auth/signup-page.tsx index 3d9b09ff7b..9d83b0bc66 100644 --- a/studio/frontend/src/features/auth/signup-page.tsx +++ b/studio/frontend/src/features/auth/signup-page.tsx @@ -4,7 +4,7 @@ import { AuthForm } from "./components/auth-form"; export function SignupPage() { return ( -
+
- +
diff --git a/studio/frontend/src/features/chat/chat-page.tsx b/studio/frontend/src/features/chat/chat-page.tsx index 5c1e61b432..34443ec87f 100644 --- a/studio/frontend/src/features/chat/chat-page.tsx +++ b/studio/frontend/src/features/chat/chat-page.tsx @@ -6,6 +6,13 @@ import { import { Thread } from "@/components/assistant-ui/thread"; import { Button } from "@/components/ui/button"; import { SidebarProvider, SidebarTrigger, useSidebar } from "@/components/ui/sidebar"; +import { + Sheet, + SheetContent, + SheetDescription, + SheetHeader, + SheetTitle, +} from "@/components/ui/sheet"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; import { @@ -127,7 +134,10 @@ const CompareContent = memo(function CompareContent({ return (
-
+
@@ -145,8 +155,8 @@ const CompareContent = memo(function CompareContent({
-
-
+
+
Fine-tuned (LoRA) @@ -178,8 +188,23 @@ function InlineSidebar({ children: ReactNode; side?: "left" | "right"; }) { - const { state } = useSidebar(); + const { state, isMobile, openMobile, setOpenMobile } = useSidebar(); const collapsed = state === "collapsed"; + + if (isMobile) { + return ( + + + + Chat sidebar + Chat threads and actions + +
{children}
+
+
+ ); + } + return (
+
-
+
{modelsError && ( diff --git a/studio/frontend/src/features/export/export-page.tsx b/studio/frontend/src/features/export/export-page.tsx index af670aae16..9d3e5053de 100644 --- a/studio/frontend/src/features/export/export-page.tsx +++ b/studio/frontend/src/features/export/export-page.tsx @@ -237,7 +237,7 @@ export function ExportPage() { // ---- Render ---- return (
-
+
@@ -275,7 +275,7 @@ export function ExportPage() { {!loadingCheckpoints && !checkpointError && ( <> {/* Top row: Dropdowns + metadata | Guide */} -
+
{/* Training run dropdown */}
@@ -410,7 +410,7 @@ export function ExportPage() { Training Info -
+
Base Model {baseModelName} diff --git a/studio/frontend/src/features/onboarding/components/wizard-content.tsx b/studio/frontend/src/features/onboarding/components/wizard-content.tsx index 2f10be0fcd..20e37f7d58 100644 --- a/studio/frontend/src/features/onboarding/components/wizard-content.tsx +++ b/studio/frontend/src/features/onboarding/components/wizard-content.tsx @@ -31,19 +31,19 @@ export function WizardContent() { return (
-
- Unsloth mascot +
+ Unsloth mascot
-

{stepConfig.title}

+

{stepConfig.title}

{stepConfig.description}

-

+

Step {currentStep} of {STEPS.length}

-
+
diff --git a/studio/frontend/src/features/onboarding/components/wizard-layout.tsx b/studio/frontend/src/features/onboarding/components/wizard-layout.tsx index a1c18b8b92..8153922395 100644 --- a/studio/frontend/src/features/onboarding/components/wizard-layout.tsx +++ b/studio/frontend/src/features/onboarding/components/wizard-layout.tsx @@ -54,7 +54,7 @@ export function WizardLayout() { }, [isFinalStep]); return ( -
+
{showSplash && ( setShowSplash(false)} @@ -81,7 +81,7 @@ export function WizardLayout() { ease: [0.165, 0.84, 0.44, 1], }} > - +
diff --git a/studio/frontend/src/features/onboarding/components/wizard-sidebar.tsx b/studio/frontend/src/features/onboarding/components/wizard-sidebar.tsx index 6cd5c36a6f..734c8c166d 100644 --- a/studio/frontend/src/features/onboarding/components/wizard-sidebar.tsx +++ b/studio/frontend/src/features/onboarding/components/wizard-sidebar.tsx @@ -8,8 +8,8 @@ export function WizardSidebar() { const progress = ((currentStep - 1) / (STEPS.length - 1)) * 100; return ( -