fix(admin-web): fit tables by their own overflow; headings keep one line
Overflow inside a padded panel did not show on the panel, so the dashboard jobs table kept its Node column and spilled into the padding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
2 files changed
+4
-4
No files matched your search
@@ -124,7 +124,8 @@ input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); margi
|
||||
.panel { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius-card); padding: 16px 18px; display: grid; gap: 10px; align-content: start; min-width: 0; }
|
||||
.panel.flush { padding: 0; gap: 0; overflow-x: auto; }
|
||||
.panel-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
|
||||
.panel-head h2 { flex: 1; }
|
||||
/* Headings stay on one line; the figures beside them give way first. */
|
||||
.panel-head h2 { flex: 1 0 auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.panel-head > .ellipsis { flex: 0 1 auto; }
|
||||
.panel-head.padded { padding: 12px 18px; border-bottom: 1px solid var(--stroke); }
|
||||
.empty { padding: 24px 18px; color: var(--text-muted); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
|
||||
@@ -173,7 +174,7 @@ svg.chart .label { fill: var(--text-muted); }
|
||||
.table .wide { grid-column: 1 / -1; }
|
||||
.table.users { grid-template-columns: minmax(120px, 1.4fr) max-content minmax(100px, 1.3fr) minmax(70px, 1fr) max-content max-content max-content; }
|
||||
.table.jobs { grid-template-columns: minmax(70px, max-content) minmax(120px, 1.6fr) minmax(60px, max-content) minmax(90px, 1fr) max-content max-content max-content; }
|
||||
.table.jobs-mini { grid-template-columns: minmax(60px, max-content) minmax(80px, 1.5fr) minmax(50px, max-content) minmax(70px, 1fr) max-content max-content; }
|
||||
.table.jobs-mini { grid-template-columns: minmax(60px, max-content) minmax(120px, 1.5fr) minmax(50px, max-content) minmax(70px, 1fr) max-content max-content; }
|
||||
.table.jobs-mini .thead, .table.jobs-mini .row { padding: 0; }
|
||||
.table.jobs-mini .row { min-height: 40px; border-bottom: 0; }
|
||||
.table.nodes { grid-template-columns: minmax(100px, 1fr) minmax(60px, max-content) minmax(100px, 1.2fr) max-content max-content max-content; }
|
||||
|
||||
@@ -88,11 +88,10 @@ export function columns(items, { label, sun = false, valueLabel = null, edgeLabe
|
||||
* the panel: the widths depend on the language and on the side panel, so they are measured rather than guessed.
|
||||
*/
|
||||
export function fitColumns(table) {
|
||||
const host = table.parentElement;
|
||||
const levels = Number(table.dataset.levels);
|
||||
for (let level = 0; level <= levels; level++) {
|
||||
for (let i = 1; i <= levels; i++) table.classList.toggle(`fit-${i}`, i <= level);
|
||||
if (host.scrollWidth <= host.clientWidth) return;
|
||||
if (table.scrollWidth <= table.clientWidth) return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user