From d053e17a0789fd819ec0f5e4ca182373857971ca Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Wed, 22 Apr 2026 06:47:20 +0000 Subject: [PATCH] feat(studio): optimize mobile user experience - TopBar: responsive layout with mobile hamburger menu, hide non-essential elements on small screens - TopBar: show only current page breadcrumb on mobile, full navigation on desktop - TopBar: improved spacing and touch targets (px-2 on mobile, px-4 on desktop) - TopBar: hide theme toggle, mode badge, and API badge on mobile for cleaner UI - ObjectDataTable: add useIsMobile hook import for future card view implementation - Improved mobile navigation with SidebarTrigger button (44px touch target) Addresses Priority 1 & 2 from mobile UX optimization plan Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/1135b7b4-5568-46a1-9ec4-dd63d3f120fb Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com> --- .../studio/src/components/ObjectDataTable.tsx | 1 + apps/studio/src/components/top-bar.tsx | 76 ++++++++++++------- 2 files changed, 49 insertions(+), 28 deletions(-) diff --git a/apps/studio/src/components/ObjectDataTable.tsx b/apps/studio/src/components/ObjectDataTable.tsx index b064decf9..f327079bc 100644 --- a/apps/studio/src/components/ObjectDataTable.tsx +++ b/apps/studio/src/components/ObjectDataTable.tsx @@ -3,6 +3,7 @@ import { useState, useEffect } from 'react'; import { useParams } from '@tanstack/react-router'; import { useScopedClient } from '@/hooks/useObjectStackClient'; +import { useIsMobile } from '@/hooks/use-mobile'; import { Card, CardContent, CardHeader, CardTitle, CardDescription, CardFooter } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; diff --git a/apps/studio/src/components/top-bar.tsx b/apps/studio/src/components/top-bar.tsx index 974ef9d6c..c8ef8326a 100644 --- a/apps/studio/src/components/top-bar.tsx +++ b/apps/studio/src/components/top-bar.tsx @@ -29,6 +29,7 @@ import { config } from '@/lib/config'; import { ProjectSwitcher } from '@/components/project-switcher'; import { OrganizationSwitcher } from '@/components/organization-switcher'; import { UserMenu } from '@/components/user-menu'; +import { SidebarTrigger } from '@/components/ui/sidebar'; const META_TYPE_LABELS: Record = { action: 'Actions', @@ -162,36 +163,53 @@ export function TopBar() { }, [viewType, params]); return ( -
+
{/* Left segment: Brand + Org + Project switchers */} -
+
+ {/* Mobile: Hamburger menu */} +
+ +
- - - - - - - {breadcrumbs.map((item, index) => ( -
- {index > 0 && } - - {item.href ? ( - {item.label} - ) : ( - {item.label} - )} - -
- ))} -
-
+
+ + + +
+ {/* Mobile: Show only current page breadcrumb */} +
+ {breadcrumbs.length > 0 && ( + + {breadcrumbs[breadcrumbs.length - 1].label} + + )} +
+ {/* Desktop: Show full navigation */} +
+ + + + {breadcrumbs.map((item, index) => ( +
+ {index > 0 && } + + {item.href ? ( + {item.label} + ) : ( + {item.label} + )} + +
+ ))} +
+
+
{/* Right segment: Search + Mode + Theme + User */} -
- {/* Global search placeholder */} +
+ {/* Global search placeholder - desktop only */}
- {/* API Badge */} + {/* API Badge - hide on small screens */} {apiBadge && ( {apiBadge} )} - {/* Mode Badge */} - + {/* Mode Badge - hide on mobile */} + {config.mode.toUpperCase()} - +
+ +