Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
fix: fix tables rows not flex redering to use the full table width (#2928)
Kyle Mendell4de2ce845c65
diff --git a/frontend/messages/en.json b/frontend/messages/en.jsonindex 807c05339..0402bb12e 100644--- a/frontend/messages/en.json+++ b/frontend/messages/en.json@@ -1718,7 +1718,7 @@"templates_edit_template": "Edit Template","templates_delete_template": "Delete Template","templates_template_name_label": "Template Name",- "templates_template_name_placeholder": "e.g. My Nginx Stack",+ "templates_template_name_placeholder": "e.g. My Nginx Project","templates_template_name_required": "Template name is required","templates_template_description_label": "Description","templates_template_description_placeholder": "Briefly describe this template",diff --git a/frontend/src/lib/components/arcane-table/arcane-table-desktop-view.svelte b/frontend/src/lib/components/arcane-table/arcane-table-desktop-view.svelteindex 464493826..e8ee0018d 100644--- a/frontend/src/lib/components/arcane-table/arcane-table-desktop-view.svelte+++ b/frontend/src/lib/components/arcane-table/arcane-table-desktop-view.svelte@@ -128,12 +128,16 @@const flatRows = $derived(table.getRowModel().rows);const shouldVirtualize = $derived(!isGrouped && !hasExpand && !!scrollElement && flatRows.length > VIRTUALIZE_THRESHOLD);- // Row actions live in a host cell that absorbs the table's leftover width, so data columns- // size to their content and the floating actions button (see cellContent) gets free room at- // the row's end instead of overlapping the last data column. Under the virtualized layout- // the table is table-fixed, where a 100%-width column would squash the auto columns to- // nothing — there the cell stays zero-width and the button floats over the row as before.- const actionsCellClasses = $derived(shouldVirtualize ? 'relative w-0 p-0 last:pr-0' : 'relative w-full p-0 last:pr-0');+ // Row actions are a real pinned column: sticky to the row's right edge with its own reserved+ // width, so the floating button never overlaps data columns and survives horizontal scroll.+ // bg-inherit picks up the row's background (including hover/selected tints) to mask content+ // scrolling beneath the sticky cell. Under the virtualized table-fixed layout an auto-sized+ // (w-0 + nowrap) column would collapse, so it gets an explicit width there instead.+ const actionsCellClasses = $derived(+ shouldVirtualize+ ? 'sticky right-0 z-10 w-24 bg-inherit p-0 whitespace-nowrap'+ : 'sticky right-0 z-10 w-0 bg-inherit p-0 whitespace-nowrap'+ );// Runes can't be created conditionally, so the virtualizer always exists but is `enabled` only// when we actually virtualize; disabled, it stays cheap and reports an empty window.@@ -149,13 +153,11 @@{#snippet cellContent(cell: ArcaneCell<TData>)}{#if cell.column.id === 'actions'}- <!-- Row actions float over the row's right edge, revealed on hover/focus (or while the menu is- open). pointer-events are off until revealed so the hidden control can't swallow row clicks. -->- <div- class="pointer-events-none absolute top-1/2 right-2 z-10 -translate-y-1/2 opacity-0 transition-opacity group-hover/row:pointer-events-auto group-hover/row:opacity-100 group-focus-within/row:pointer-events-auto group-focus-within/row:opacity-100 has-[[data-state=open]]:pointer-events-auto has-[[data-state=open]]:opacity-100"- data-row-select-ignore- >- <FlexRender {cell} />+ <!-- Pinned row actions: a floating chip at the row's end, always present in its own gutter. -->+ <div class="flex items-center justify-end py-1 pr-3 pl-2" data-row-select-ignore>+ <div class="bg-card/90 border-border/50 flex items-center gap-0.5 rounded-full border p-0.5 shadow-sm backdrop-blur-sm">+ <FlexRender {cell} />+ </div></div>{:else}<FlexRender {cell} />@@ -235,7 +237,10 @@{#each headerGroup.headers as header (header.id)}<Table.Headcolspan={header.colSpan}- class={cn(header.column.id === 'select' && selectCellClasses, header.column.id === 'actions' && actionsCellClasses)}+ class={cn(+ header.column.id === 'select' && selectCellClasses,+ header.column.id === 'actions' && cn(actionsCellClasses, 'bg-background z-30')+ )}>{#if !header.isPlaceholder}<FlexRender {header} />diff --git a/frontend/src/lib/components/arcane-table/arcane-table-toolbar.svelte b/frontend/src/lib/components/arcane-table/arcane-table-toolbar.svelteindex de654d98f..f2865c39f 100644--- a/frontend/src/lib/components/arcane-table/arcane-table-toolbar.svelte+++ b/frontend/src/lib/components/arcane-table/arcane-table-toolbar.svelte@@ -87,7 +87,7 @@const activeFilterCount = $derived(table.state.columnFilters.length);</script>-<div class={cn('flex flex-wrap items-center gap-2 px-3 py-2.5', className)}>+<div class={cn('flex flex-wrap items-center gap-2 px-4 py-3', className)}><div class="order-1 flex min-w-0 flex-1 items-center gap-2 md:flex-none"><div class="relative min-w-0 flex-1 md:w-64 md:flex-none"><SearchIcon class="text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2" />diff --git a/frontend/src/lib/components/arcane-table/arcane-table.svelte b/frontend/src/lib/components/arcane-table/arcane-table.svelteindex c0c1b2f91..3ea453f78 100644--- a/frontend/src/lib/components/arcane-table/arcane-table.svelte+++ b/frontend/src/lib/components/arcane-table/arcane-table.svelte@@ -686,7 +686,10 @@</div>{/if}- <div bind:this={desktopScrollEl} class="[isolation:isolate] hidden h-full min-h-0 flex-1 overflow-auto md:block">+ <div+ bind:this={desktopScrollEl}+ class="bg-background/80 [isolation:isolate] hidden h-full min-h-0 flex-1 overflow-auto md:block"+ ><ArcaneTableDesktopView{table}{selectedIds}@@ -708,7 +711,7 @@/></div>- <div class="[isolation:isolate] block flex-1 overflow-auto md:hidden">+ <div class="bg-background/80 [isolation:isolate] block flex-1 overflow-auto md:hidden"><div class="divide-border/40 divide-y"><ArcaneTableMobileView{table}@@ -726,7 +729,7 @@</div>{#if !withoutPagination}- <div class="shrink-0 border-t px-2 py-4">+ <div class="border-border/50 shrink-0 border-t px-4 py-3">{@render PaginationSnippet()}</div>{/if}@@ -789,7 +792,7 @@</div>{#if !withoutPagination}- <div class="border-border/50 shrink-0 border-t px-2 py-4">+ <div class="border-border/50 shrink-0 border-t px-4 py-3">{@render PaginationSnippet()}</div>{/if}diff --git a/frontend/src/lib/components/ui/table/table-cell.svelte b/frontend/src/lib/components/ui/table/table-cell.svelteindex 4ded6662a..7708c7daf 100644--- a/frontend/src/lib/components/ui/table/table-cell.svelte+++ b/frontend/src/lib/components/ui/table/table-cell.svelte@@ -9,7 +9,7 @@bind:this={ref}data-slot="table-cell"class={cn(- 'bg-transparent px-4 py-2 align-middle whitespace-nowrap',+ 'bg-transparent px-4 py-3 align-middle whitespace-nowrap','first:pl-6 last:pr-6 [&:has([role=checkbox])]:pr-0',className)}