-
Notifications
You must be signed in to change notification settings - Fork 0
Mobile responsiveness for console UI #426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0933591
8177d5e
3ecedc4
cdcff78
964d69f
1799a98
ded445d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,23 +76,23 @@ export function AppHeader({ appName, objects, connectionState }: { appName: stri | |
| } | ||
|
|
||
| return ( | ||
| <div className="flex items-center justify-between w-full h-full px-2 md:px-4 gap-2"> | ||
| <div className="flex items-center gap-2"> | ||
| <div className="flex items-center justify-between w-full h-full px-2 sm:px-3 md:px-4 gap-1.5 sm:gap-2"> | ||
| <div className="flex items-center gap-1.5 sm:gap-2 min-w-0 flex-1"> | ||
| {/* Mobile sidebar trigger */} | ||
| <SidebarTrigger className="md:hidden" /> | ||
| <Separator orientation="vertical" className="h-4 md:hidden" /> | ||
| <SidebarTrigger className="md:hidden shrink-0" /> | ||
| <Separator orientation="vertical" className="h-4 md:hidden shrink-0" /> | ||
|
|
||
| <Breadcrumb className="hidden sm:flex"> | ||
| <Breadcrumb className="hidden sm:flex min-w-0"> | ||
| <BreadcrumbList> | ||
| {breadcrumbItems.map((item, index) => ( | ||
| <Fragment key={index}> | ||
| {index > 0 && <BreadcrumbSeparator />} | ||
| <BreadcrumbItem> | ||
| {index === breadcrumbItems.length - 1 || !item.href ? ( | ||
| <BreadcrumbPage>{item.label}</BreadcrumbPage> | ||
| <BreadcrumbPage className="truncate max-w-[200px]">{item.label}</BreadcrumbPage> | ||
| ) : ( | ||
| <BreadcrumbLink asChild> | ||
| <Link to={item.href}>{item.label}</Link> | ||
| <Link to={item.href} className="truncate max-w-[150px]">{item.label}</Link> | ||
| </BreadcrumbLink> | ||
| )} | ||
| </BreadcrumbItem> | ||
|
|
@@ -102,12 +102,12 @@ export function AppHeader({ appName, objects, connectionState }: { appName: stri | |
| </Breadcrumb> | ||
|
|
||
| {/* Mobile: Just show current page */} | ||
| <span className="text-sm font-medium sm:hidden truncate max-w-37.5"> | ||
| <span className="text-sm font-medium sm:hidden truncate min-w-0"> | ||
| {breadcrumbItems[breadcrumbItems.length - 1]?.label || appName} | ||
| </span> | ||
| </div> | ||
|
|
||
| <div className="flex items-center gap-1 md:gap-2"> | ||
| <div className="flex items-center gap-0.5 sm:gap-1 md:gap-2 shrink-0"> | ||
| {/* Connection Status */} | ||
| {connectionState && <ConnectionStatus state={connectionState} />} | ||
|
|
||
|
|
@@ -127,24 +127,26 @@ export function AppHeader({ appName, objects, connectionState }: { appName: stri | |
| <Button | ||
| variant="ghost" | ||
| size="icon" | ||
| className="lg:hidden h-8 w-8" | ||
| className="lg:hidden h-8 w-8 shrink-0" | ||
| onClick={() => document.dispatchEvent(new KeyboardEvent('keydown', { key: 'k', metaKey: true }))} | ||
| > | ||
| <Search className="h-4 w-4" /> | ||
| </Button> | ||
|
Comment on lines
127
to
134
|
||
|
|
||
| {/* Notifications */} | ||
| <Button variant="ghost" size="icon" className="h-8 w-8 hidden sm:flex"> | ||
| <Button variant="ghost" size="icon" className="h-8 w-8 hidden sm:flex shrink-0"> | ||
| <Bell className="h-4 w-4" /> | ||
| </Button> | ||
|
|
||
| {/* Help */} | ||
| <Button variant="ghost" size="icon" className="h-8 w-8 hidden md:flex"> | ||
| <Button variant="ghost" size="icon" className="h-8 w-8 hidden md:flex shrink-0"> | ||
| <HelpCircle className="h-4 w-4" /> | ||
| </Button> | ||
|
Comment on lines
+137
to
144
|
||
|
|
||
| {/* Theme toggle */} | ||
| <ModeToggle /> | ||
| <div className="shrink-0"> | ||
| <ModeToggle /> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -208,19 +208,19 @@ export function ObjectView({ dataSource, objects, onEdit, onRowClick }: any) { | |||||||||||||||
| return ( | ||||||||||||||||
| <div className="h-full flex flex-col bg-background"> | ||||||||||||||||
| {/* 1. Main Header */} | ||||||||||||||||
| <div className="flex justify-between items-center py-3 px-4 border-b shrink-0 bg-background z-10"> | ||||||||||||||||
| <div className="flex items-center gap-3"> | ||||||||||||||||
| <div className="bg-primary/10 p-2 rounded-md shrink-0"> | ||||||||||||||||
| <div className="flex justify-between items-center py-2.5 sm:py-3 px-3 sm:px-4 border-b shrink-0 bg-background z-10"> | ||||||||||||||||
| <div className="flex items-center gap-2 sm:gap-3 min-w-0 flex-1"> | ||||||||||||||||
| <div className="bg-primary/10 p-1.5 sm:p-2 rounded-md shrink-0"> | ||||||||||||||||
| <TableIcon className="h-4 w-4 text-primary" /> | ||||||||||||||||
| </div> | ||||||||||||||||
| <div> | ||||||||||||||||
| <h1 className="text-lg font-semibold tracking-tight text-foreground">{objectDef.label}</h1> | ||||||||||||||||
| <div className="min-w-0"> | ||||||||||||||||
| <h1 className="text-base sm:text-lg font-semibold tracking-tight text-foreground truncate">{objectDef.label}</h1> | ||||||||||||||||
| </div> | ||||||||||||||||
| </div> | ||||||||||||||||
|
|
||||||||||||||||
| <div className="flex items-center gap-2"> | ||||||||||||||||
| <div className="flex items-center gap-1.5 sm:gap-2 shrink-0"> | ||||||||||||||||
| <MetadataToggle open={showDebug} onToggle={toggleDebug} className="hidden sm:flex" /> | ||||||||||||||||
| <Button size="sm" onClick={actions.create} className="shadow-none gap-2"> | ||||||||||||||||
| <Button size="sm" onClick={actions.create} className="shadow-none gap-1.5 sm:gap-2 h-8 sm:h-9"> | ||||||||||||||||
|
||||||||||||||||
| <Button size="sm" onClick={actions.create} className="shadow-none gap-1.5 sm:gap-2 h-8 sm:h-9"> | |
| <Button | |
| size="sm" | |
| onClick={actions.create} | |
| className="shadow-none gap-1.5 sm:gap-2 h-8 sm:h-9" | |
| aria-label="Create new record" | |
| > |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -48,12 +48,13 @@ export function ReportView({ dataSource: _dataSource }: { dataSource?: any }) { | |||||||||||||||||
| if (isEditing) { | ||||||||||||||||||
| return ( | ||||||||||||||||||
| <div className="flex flex-col h-full overflow-hidden bg-background"> | ||||||||||||||||||
| <div className="flex items-center p-4 border-b bg-muted/10 gap-2"> | ||||||||||||||||||
| <Button variant="ghost" size="sm" onClick={() => setIsEditing(false)}> | ||||||||||||||||||
| <div className="flex items-center p-3 sm:p-4 border-b bg-muted/10 gap-2"> | ||||||||||||||||||
| <Button variant="ghost" size="sm" onClick={() => setIsEditing(false)} className="shrink-0"> | ||||||||||||||||||
| <ChevronLeft className="h-4 w-4 mr-1" /> | ||||||||||||||||||
| Back to View | ||||||||||||||||||
| <span className="hidden sm:inline">Back to View</span> | ||||||||||||||||||
| <span className="sm:hidden">Back</span> | ||||||||||||||||||
| </Button> | ||||||||||||||||||
| <div className="font-medium">Edit Report: {reportData.title}</div> | ||||||||||||||||||
| <div className="font-medium truncate">Edit Report: {reportData.title}</div> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| <div className="flex-1 overflow-auto"> | ||||||||||||||||||
| <ReportBuilder | ||||||||||||||||||
|
|
@@ -82,23 +83,23 @@ export function ReportView({ dataSource: _dataSource }: { dataSource?: any }) { | |||||||||||||||||
|
|
||||||||||||||||||
| return ( | ||||||||||||||||||
| <div className="flex flex-col h-full overflow-hidden bg-background"> | ||||||||||||||||||
| <div className="flex justify-between items-center p-6 border-b shrink-0 bg-muted/10"> | ||||||||||||||||||
| <div> | ||||||||||||||||||
| <div className="flex flex-col sm:flex-row justify-between sm:items-center gap-3 sm:gap-4 p-4 sm:p-6 border-b shrink-0 bg-muted/10"> | ||||||||||||||||||
| <div className="min-w-0"> | ||||||||||||||||||
| {/* Header is handled by ReportViewer usually, but we can have a page header too */} | ||||||||||||||||||
| <h1 className="text-lg font-medium text-muted-foreground">{reportData.title || 'Report Viewer'}</h1> | ||||||||||||||||||
| <h1 className="text-base sm:text-lg font-medium text-muted-foreground truncate">{reportData.title || 'Report Viewer'}</h1> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| <div className="flex items-center gap-2"> | ||||||||||||||||||
| <Button variant="outline" size="sm" onClick={() => setIsEditing(true)}> | ||||||||||||||||||
| <PenLine className="h-4 w-4 mr-2" /> | ||||||||||||||||||
| Edit Report | ||||||||||||||||||
| <div className="flex items-center gap-2 shrink-0"> | ||||||||||||||||||
| <Button variant="outline" size="sm" onClick={() => setIsEditing(true)} className="h-8"> | ||||||||||||||||||
|
||||||||||||||||||
| <Button variant="outline" size="sm" onClick={() => setIsEditing(true)} className="h-8"> | |
| <Button | |
| variant="outline" | |
| size="sm" | |
| onClick={() => setIsEditing(true)} | |
| className="h-8" | |
| aria-label="Edit report" | |
| > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR description mentions touch targets ≥44px, but this change sets explicit h-8/w-8 sizing (32px) for the icon button. If 44px is a hard requirement, consider using the existing Button size variants (e.g., size="icon"/"icon-lg") or a 44px height class instead of h-8/w-8.