Improve running queue card layout stability
This commit is contained in:
@@ -168,4 +168,6 @@
|
||||
.pqueue-table-wrapper{padding-bottom:.25rem}
|
||||
.pqueue-col--submitted .pqueue-cell__primary,.pqueue-col--estimate .pqueue-cell__primary{font-weight:500}
|
||||
.pqueue-muted{color:var(--subtle-text,#94a3b8)}
|
||||
/* Stabilize running card height to avoid tiny layout shifts */
|
||||
.pqueue-item--running{min-height:56px}
|
||||
|
||||
+4
-2
@@ -690,8 +690,9 @@
|
||||
}
|
||||
const card = UI.card("Currently running", {
|
||||
icon: "ti ti-activity-heartbeat",
|
||||
subtitle: state.metrics.runningCount ? `${state.metrics.runningCount} active` : null,
|
||||
subtitle: state.metrics.runningCount ? `${state.metrics.runningCount} active` : "",
|
||||
content: rows,
|
||||
classes: "pqueue-card--running",
|
||||
});
|
||||
state.dom.runningCard = card;
|
||||
return card;
|
||||
@@ -1027,7 +1028,8 @@
|
||||
if (!card) return;
|
||||
const body = card.querySelector('.pqueue-card__body');
|
||||
if (!body) return;
|
||||
const beforeHeight = Math.max(0, body.offsetHeight || 0);
|
||||
const rect = body.getBoundingClientRect();
|
||||
const beforeHeight = Math.max(0, (rect && rect.height) || 0);
|
||||
body.innerHTML = '';
|
||||
if (!state.queue_running.length) {
|
||||
// Preserve current height to avoid layout shift
|
||||
|
||||
Reference in New Issue
Block a user