fix(helpdesk): consistent table columns across agent cards via colgroup
Use table-layout:fixed with colgroup defining column widths in ch units. Every agent card table gets the same colgroup, ensuring identical column alignment across all cards. Ticket (9ch), Customer (22ch), Category (16ch), Activity (11ch) are fixed; Description takes remaining space with ellipsis. All cells get overflow:hidden + text-overflow:ellipsis. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -129,6 +129,16 @@ if (container) {
|
||||
const tickets = m.open_ticket_details || [];
|
||||
if (tickets.length > 0) {
|
||||
const table = h('table', 'helpdesk-team-ticket-table');
|
||||
|
||||
// Colgroup for consistent column widths across all agent cards
|
||||
const colgroup = document.createElement('colgroup');
|
||||
colgroup.appendChild(h('col', 'helpdesk-team-col-ticket'));
|
||||
colgroup.appendChild(h('col', 'helpdesk-team-col-customer'));
|
||||
colgroup.appendChild(h('col', 'helpdesk-team-col-description'));
|
||||
colgroup.appendChild(h('col', 'helpdesk-team-col-category'));
|
||||
colgroup.appendChild(h('col', 'helpdesk-team-col-activity'));
|
||||
table.appendChild(colgroup);
|
||||
|
||||
const thead = h('thead');
|
||||
const headRow = h('tr');
|
||||
headRow.appendChild(h('th', '', container.dataset.labelTicket || 'Ticket'));
|
||||
|
||||
Reference in New Issue
Block a user