Fix Builder layout and Loading... initialization bug

Layout: replace admin-container wrapper with #builder-page flex column;
add min-height:0 to builder-wrap, builder-body, both panels so the
inner scroll areas actually shrink correctly in a flex column.

Loading...: scripts at end of body mean DOMContentLoaded may have
already fired by the time the listener is registered. Check
document.readyState first and call init() directly if DOM is ready.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-13 19:26:26 -07:00
parent 21e856f250
commit b894e22bdc
3 changed files with 27 additions and 7 deletions
+13 -1
View File
@@ -5,10 +5,19 @@
/* ── Page layout ─────────────────────────────────────────────── */
#builder-page {
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
}
.builder-wrap {
display: flex;
flex-direction: column;
height: calc(100vh - 64px); /* below fixed admin header */
flex: 1;
min-height: 0; /* lets children shrink below their content height */
overflow: hidden;
}
.builder-toolbar {
@@ -131,6 +140,7 @@
display: grid;
grid-template-columns: 380px 1fr;
flex: 1;
min-height: 0; /* required — without this the grid doesn't shrink in a flex column */
overflow: hidden;
}
@@ -140,6 +150,7 @@
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
min-height: 0;
overflow: hidden;
background: var(--bg);
}
@@ -294,6 +305,7 @@
.builder-library {
display: flex;
flex-direction: column;
min-height: 0;
overflow: hidden;
background: var(--bg);
}