Make title column greedy when other columns are hidden

Removes inline max-width/nowrap from title td, moves to CSS with
width:99% so the title column absorbs all available space freed by
hiding other columns. max-width:0 trick ensures overflow ellipsis
still works correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-05 12:33:51 -04:00
parent c6037a9ccc
commit 025963a78f
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -8,6 +8,16 @@
margin-bottom: 1rem; margin-bottom: 1rem;
} }
/* ── Title column: greedy — absorbs freed space when cols hidden ─ */
#tickets-table th[data-col="title"],
#tickets-table td.col-title {
width: 99%;
max-width: 0; /* lets overflow:hidden + ellipsis work */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* ── Column toggle panel ─────────────────────────────────────── */ /* ── Column toggle panel ─────────────────────────────────────── */
.col-toggle-panel { .col-toggle-panel {
position: absolute; position: absolute;
+1 -1
View File
@@ -687,7 +687,7 @@ include __DIR__ . '/layout_header.php';
<?php $badgeClass = match($pNum) { 1 => 'lt-badge-p1', 2 => 'lt-badge-p2', 3 => 'lt-badge-p3', default => 'lt-badge-p4' }; ?> <?php $badgeClass = match($pNum) { 1 => 'lt-badge-p1', 2 => 'lt-badge-p2', 3 => 'lt-badge-p3', default => 'lt-badge-p4' }; ?>
<span class="lt-badge <?= $badgeClass ?>">P<?= $pNum ?></span> <span class="lt-badge <?= $badgeClass ?>">P<?= $pNum ?></span>
</td> </td>
<td data-label="Title" data-col="title" style="max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"> <td data-label="Title" data-col="title" class="col-title">
<span data-tooltip="<?= htmlspecialchars($row['title'], ENT_QUOTES, 'UTF-8') ?>" data-tooltip-pos="top"><?= htmlspecialchars($row['title']) ?></span> <span data-tooltip="<?= htmlspecialchars($row['title'], ENT_QUOTES, 'UTF-8') ?>" data-tooltip-pos="top"><?= htmlspecialchars($row['title']) ?></span>
</td> </td>
<td data-label="Category" data-col="category" class="lt-text-muted lt-text-xs"><?= htmlspecialchars($row['category']) ?></td> <td data-label="Category" data-col="category" class="lt-text-muted lt-text-xs"><?= htmlspecialchars($row['category']) ?></td>