Frontend mobile fixes (#714)

* Allow ResourcePageHeader items to wrap

* Allow CardHeader items to wrap

* Increase z-index of sticky TableHeader, fixes #690

* Remove fixed widths from ActionButton, let them flex more to fit more layouts

* Make Section scroll overflow

* Remove grid class from Tabs, seems to prevent them from overflowing at small sizes
This commit is contained in:
Sam Edwards
2025-08-07 04:50:33 -07:00
committed by GitHub
parent e8e1d1dfbc
commit 9f413fec21
12 changed files with 10 additions and 12 deletions

View File

@@ -185,7 +185,7 @@ export const Section = ({
{(title || icon || titleRight || titleOther || actions) && (
<div
className={cn(
"flex flex-wrap gap-2 justify-between",
"flex flex-wrap gap-2 justify-between overflow-x-scroll",
itemsCenterTitleRow ? "items-center" : "items-start"
)}
>

View File

@@ -83,7 +83,6 @@ const ConfigInfoDeployments = ({ id }: { id: string }) => {
<Tabs
value={deploymentsDisabled && view === "Deployments" ? "Config" : view}
onValueChange={setView as any}
className="grid gap-4"
>
<TabsContent value="Config">
<BuildConfig id={id} titleOther={titleOther} />

View File

@@ -85,7 +85,7 @@ export const ResourcePageHeader = ({
const background = hex_color_by_intention(intent) + "15";
return (
<div
className="flex items-center justify-between gap-4 pl-8 pr-8 py-4 rounded-t-md w-full"
className="flex flex-wrap items-center justify-between gap-4 pl-8 pr-8 py-4 rounded-t-md w-full"
style={{ background }}
>
<div className="flex items-center gap-8">

View File

@@ -151,7 +151,7 @@ const ConfigTabsInner = ({
[deployment.id]
);
return (
<Tabs value={view} onValueChange={setView as any} className="grid gap-4">
<Tabs value={view} onValueChange={setView as any}>
<TabsContent value="Config">
<DeploymentConfig id={deployment.id} titleOther={tabs} />
</TabsContent>

View File

@@ -105,7 +105,7 @@ const ConfigInfoPending = ({ id }: { id: string }) => {
</TabsList>
);
return (
<Tabs value={view} onValueChange={setView as any} className="grid gap-4">
<Tabs value={view} onValueChange={setView as any}>
<TabsContent value="Config">
<ResourceSyncConfig id={id} titleOther={title} />
</TabsContent>

View File

@@ -124,7 +124,6 @@ const ConfigTabs = ({ id }: { id: string }) => {
<Tabs
value={currentView}
onValueChange={setView as any}
className="grid gap-4"
>
<TabsContent value="Config">
<ServerConfig id={id} titleOther={tabsList} />

View File

@@ -115,7 +115,7 @@ const ConfigInfoServicesLog = ({ id }: { id: string }) => {
</TabsList>
);
return (
<Tabs value={view} onValueChange={setView as any} className="grid gap-4">
<Tabs value={view} onValueChange={setView as any}>
<TabsContent value="Config">
<StackConfig id={id} titleOther={title} />
</TabsContent>

View File

@@ -151,7 +151,7 @@ export const ActionButton = forwardRef<
<Button
size={size}
variant={variant || "secondary"}
className={cn("flex items-center justify-between w-[190px]", className)}
className={cn("flex flex-1 shrink-0 gap-4 items-center justify-between max-w-[190px]", className)}
onClick={onClick}
onBlur={onBlur}
disabled={disabled || loading}

View File

@@ -290,7 +290,7 @@ const ContainerTabs = ({
[server, container]
);
return (
<Tabs value={view} onValueChange={setView as any} className="grid gap-4">
<Tabs value={view} onValueChange={setView as any}>
<TabsContent value="Log">
<ContainerLogs
id={server}

View File

@@ -303,7 +303,7 @@ const StackServiceTabs = ({
[stack.id, service]
);
return (
<Tabs value={view} onValueChange={setView as any} className="grid gap-4">
<Tabs value={view} onValueChange={setView as any}>
<TabsContent value="Log">
<StackServiceLogs
id={stack.id}

View File

@@ -23,7 +23,7 @@ const CardHeader = React.forwardRef<
>(({ className, ...props }, ref) => (
<div
ref={ref}
className={cn("flex flex-col space-y-1.5 p-6", className)}
className={cn("flex flex-col flex-wrap gap-4 space-y-1.5 p-6", className)}
{...props}
/>
))

View File

@@ -97,7 +97,7 @@ export function DataTable<TData, TValue>({
)}
>
<Table className="xl:table-fixed border-separate border-spacing-0">
<TableHeader className="sticky top-0">
<TableHeader className="sticky top-0 z-50">
{table.getHeaderGroups().map((headerGroup, i) => (
<TableRow key={headerGroup.id}>
{/* placeholder header */}