From 4f9ba7a2854195cc52588d1b5727f613d749cd85 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Thu, 6 Nov 2025 21:51:17 +0000 Subject: [PATCH] Allow layout to expand on wide displays (related to #643) Changed .pulse-shell from fixed 95rem cap to fluid clamp(95rem, 92vw, 120rem) to match standard monitoring dashboard behavior (Proxmox, Grafana, Portainer). On laptops/small screens: unchanged (capped at 1520px) On 1080p displays: expands to ~1766px usable width On 4K/ultrawide: expands up to 1920px max for readability Added back 2xl column widths (totaling ~1720px) that properly fit within the expanded shell, giving wide-display users more breathing room while maintaining proportional scaling across all breakpoints. Changed files: - index.css: Update .pulse-shell max-width to use clamp() - Dashboard.tsx: Add 2xl column widths calculated for expanded shell - GuestRow.tsx: Add matching 2xl column widths --- .../src/components/Dashboard/Dashboard.tsx | 22 +++++++++---------- .../src/components/Dashboard/GuestRow.tsx | 22 +++++++++---------- frontend-modern/src/index.css | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/frontend-modern/src/components/Dashboard/Dashboard.tsx b/frontend-modern/src/components/Dashboard/Dashboard.tsx index 94bf108..9534ef8 100644 --- a/frontend-modern/src/components/Dashboard/Dashboard.tsx +++ b/frontend-modern/src/components/Dashboard/Dashboard.tsx @@ -912,7 +912,7 @@ export function Dashboard(props: DashboardProps) { handleSort('name')} onKeyDown={(e) => e.key === 'Enter' && handleSort('name')} tabindex="0" @@ -922,63 +922,63 @@ export function Dashboard(props: DashboardProps) { Name {sortKey() === 'name' && (sortDirection() === 'asc' ? '▲' : '▼')} handleSort('type')} > Type {sortKey() === 'type' && (sortDirection() === 'asc' ? '▲' : '▼')} handleSort('vmid')} > VMID {sortKey() === 'vmid' && (sortDirection() === 'asc' ? '▲' : '▼')} handleSort('uptime')} > Uptime {sortKey() === 'uptime' && (sortDirection() === 'asc' ? '▲' : '▼')} handleSort('cpu')} > CPU {sortKey() === 'cpu' && (sortDirection() === 'asc' ? '▲' : '▼')} handleSort('memory')} > Memory {sortKey() === 'memory' && (sortDirection() === 'asc' ? '▲' : '▼')} handleSort('disk')} > Disk {sortKey() === 'disk' && (sortDirection() === 'asc' ? '▲' : '▼')} handleSort('diskRead')} > Disk Read{' '} {sortKey() === 'diskRead' && (sortDirection() === 'asc' ? '▲' : '▼')} handleSort('diskWrite')} > Disk Write{' '} {sortKey() === 'diskWrite' && (sortDirection() === 'asc' ? '▲' : '▼')} handleSort('networkIn')} > Net In {sortKey() === 'networkIn' && (sortDirection() === 'asc' ? '▲' : '▼')} handleSort('networkOut')} > Net Out{' '} diff --git a/frontend-modern/src/components/Dashboard/GuestRow.tsx b/frontend-modern/src/components/Dashboard/GuestRow.tsx index bea9cc1..d0bb66d 100644 --- a/frontend-modern/src/components/Dashboard/GuestRow.tsx +++ b/frontend-modern/src/components/Dashboard/GuestRow.tsx @@ -398,7 +398,7 @@ export function GuestRow(props: GuestRowProps) { // Get first cell styling const firstCellClass = createMemo(() => { const base = - 'py-0.5 pr-2 whitespace-nowrap relative w-[160px] sm:w-[200px] lg:w-[240px] xl:w-[280px]'; + 'py-0.5 pr-2 whitespace-nowrap relative w-[160px] sm:w-[200px] lg:w-[240px] xl:w-[280px] 2xl:w-[380px]'; const indent = props.isGroupedView ? GROUPED_FIRST_CELL_INDENT : DEFAULT_FIRST_CELL_INDENT; return `${base} ${indent}`; }); @@ -534,7 +534,7 @@ export function GuestRow(props: GuestRowProps) { {/* Type */} - +
{/* VMID */} - + {props.guest.vmid} {/* Uptime */} @@ -565,7 +565,7 @@ export function GuestRow(props: GuestRowProps) { {/* CPU */} - + -}> {/* Memory */} - +
-}> {/* Disk – surface usage even if guest is currently stopped so users can see last reported values */} - + {/* Disk I/O */} - +
- +
{/* Network I/O */} - +
- +
diff --git a/frontend-modern/src/index.css b/frontend-modern/src/index.css index a5a720b..fcdd3fc 100644 --- a/frontend-modern/src/index.css +++ b/frontend-modern/src/index.css @@ -120,7 +120,7 @@ @layer components { .pulse-shell { width: 100%; - max-width: 95rem; + max-width: clamp(95rem, 92vw, 120rem); margin-inline: auto; padding-inline: clamp(1rem, 3vw, 3.25rem); transition: padding-inline 0.3s ease;