From 75c96c901a0e0a704a370bd8ce3d46a041f8fd6f Mon Sep 17 00:00:00 2001 From: fs Date: Sun, 5 Apr 2026 19:34:57 +0200 Subject: [PATCH] fix(helpdesk): use auto table layout with max-width:0 ellipsis pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix missing closing brace in CSS. Use width:100% + max-width:0 on description column for consistent ellipsis across all agent tables. Narrow columns (ticket no, customer, date) use white-space:nowrap to keep natural width. No fixed percentages — fully responsive. Co-Authored-By: Claude Opus 4.6 (1M context) --- modules/helpdesk/web/css/helpdesk.css | 34 +++++++++++++++--------- modules/helpdesk/web/js/helpdesk-team.js | 2 +- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/modules/helpdesk/web/css/helpdesk.css b/modules/helpdesk/web/css/helpdesk.css index 22af051..41fafd6 100644 --- a/modules/helpdesk/web/css/helpdesk.css +++ b/modules/helpdesk/web/css/helpdesk.css @@ -183,6 +183,7 @@ border-radius: var(--app-radius, 0.375rem); border-spacing: 0; overflow: hidden; + } .helpdesk-team-ticket-table th { text-align: left; @@ -202,12 +203,32 @@ border-bottom: none; } + /* Narrow columns: no wrap, natural width */ .helpdesk-team-ticket-no { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; } + .helpdesk-team-ticket-customer { + white-space: nowrap; + } + + .helpdesk-team-ticket-date { + white-space: nowrap; + color: var(--app-muted-color); + } + + /* Description: takes remaining space, ellipsis on overflow */ + .helpdesk-team-ticket-desc { + width: 100%; + max-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + /* Links */ .helpdesk-team-ticket-no a, .helpdesk-team-ticket-table td a { color: inherit; @@ -220,18 +241,7 @@ text-decoration: underline; } - .helpdesk-team-ticket-desc { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - - .helpdesk-team-ticket-date { - white-space: nowrap; - color: var(--app-muted-color); - } - - /* Critical: only highlight the ticket number, not the entire row */ + /* Critical: only highlight the ticket number */ .helpdesk-team-ticket-critical .helpdesk-team-ticket-no, .helpdesk-team-ticket-critical .helpdesk-team-ticket-no a { color: var(--app-warning, #f59e0b); diff --git a/modules/helpdesk/web/js/helpdesk-team.js b/modules/helpdesk/web/js/helpdesk-team.js index 8ba419f..8da27e9 100644 --- a/modules/helpdesk/web/js/helpdesk-team.js +++ b/modules/helpdesk/web/js/helpdesk-team.js @@ -82,7 +82,7 @@ if (container) { tr.appendChild(noCell); // Customer name as link to debitor (link uses customer_no) - const customerCell = h('td'); + const customerCell = h('td', 'helpdesk-team-ticket-customer'); if (debitorBaseUrl && t.customer_no) { const a = h('a', '', t.customer_name || t.customer_no); a.href = debitorBaseUrl + encodeURIComponent(t.customer_no);