mirror of
https://github.com/Joulenap/joulenap.git
synced 2026-08-11 13:21:43 +02:00
fix(dashboard): hold the run-history height so the guest list keeps its rows
The bottom grid takes its row height from Run History alone, on purpose: the guest panel fills its cell absolutely and contributes no intrinsic height. That only works if the history panel's height is constant, and it was not. .table-scroll capped at 418px instead of holding it, and with no runs at all the panel rendered its empty state instead of .table-scroll, so the box did not exist. A fresh install therefore showed one guest row. The scroller now has a fixed height, the empty state lives inside it so the box exists in every state, and an expanded run grows past it from a min-height.
This commit is contained in:
@@ -584,17 +584,20 @@
|
||||
color: var(--jn-text);
|
||||
background: color-mix(in srgb, var(--jn-accent) 9%, transparent);
|
||||
}
|
||||
/* 10 rows before it scrolls: 28px header + 10 × 39px (8+8 padding + the 22px status pill
|
||||
+ 1px divider) — keep in step if the cell padding or the pill changes. */
|
||||
/* 10 rows: 28px header + 10 × 39px (8+8 padding + the 22px status pill + 1px divider) —
|
||||
keep in step if the cell padding or the pill changes. This is a fixed height, not a cap:
|
||||
the bottom grid takes its row height from this panel alone (see .gcell), so letting it
|
||||
shrink on few or zero runs squashed "Last backup per guest" down to a single row. */
|
||||
.table-scroll {
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
max-height: 418px;
|
||||
height: 418px;
|
||||
}
|
||||
/* An expanded row carries the steps + task log: too tall to read through a 12-row window,
|
||||
so RunHistory lifts the cap for as long as one is open. */
|
||||
/* An expanded row carries the steps + task log: too tall to read through a 10-row window,
|
||||
so RunHistory grows past it for as long as one is open — but never below it. */
|
||||
.table-scroll.uncapped {
|
||||
max-height: none;
|
||||
height: auto;
|
||||
min-height: 418px;
|
||||
}
|
||||
.htable {
|
||||
width: 100%;
|
||||
|
||||
@@ -70,10 +70,13 @@ export function RunHistory({
|
||||
</div>
|
||||
|
||||
{error && <div className="panel-empty">{t('dashboard.runsError')}</div>}
|
||||
{shown.length === 0 ? (
|
||||
<div className="panel-empty">{t('dashboard.noRuns')}</div>
|
||||
) : (
|
||||
<div className={`table-scroll${open !== null ? ' uncapped' : ''}`}>
|
||||
{/* The empty state lives *inside* .table-scroll so the box keeps its fixed height:
|
||||
the bottom grid takes its row height from this panel, and a collapsed one leaves
|
||||
"Last backup per guest" one row tall. */}
|
||||
<div className={`table-scroll${open !== null ? ' uncapped' : ''}`}>
|
||||
{shown.length === 0 ? (
|
||||
<div className="panel-empty">{t('dashboard.noRuns')}</div>
|
||||
) : (
|
||||
<table className="htable">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -108,8 +111,8 @@ export function RunHistory({
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
)}
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user