Revert "fix(editor-v2): reserve editor slot to stop layout shift on mount"

This reverts commit b915f2e766.
This commit is contained in:
mwiegand 2026-05-17 02:34:24 +02:00
parent b915f2e766
commit 2f1a1ef284
No known key found for this signature in database
3 changed files with 4 additions and 15 deletions

View file

@ -9,21 +9,10 @@
* in _editor_assets.html un-hides for JS-disabled users. */
textarea[data-editor-language] { display: none; }
/* Wrapper that reserves layout space before cm6 mounts, sized by the
* inline `min-height` style each call site sets to match the original
* textarea's `rows`. cm6 is a flex child that fills the reserved space
* (otherwise short content would render cm6 small with a gap below). */
.editor-mount {
display: flex;
flex-direction: column;
}
.editor-mount > .cm-editor {
flex: 1;
}
.cm-editor {
border: var(--line);
border-radius: var(--radius-s);
min-height: 8em;
}
.cm-editor.cm-focused {

View file

@ -51,7 +51,7 @@
<pre class="config-preview" aria-label="Auto-loaded overlay configs">{% for o in exposed %}exec {{ o.name }}.cfg
{% endfor %}</pre>
{% endif %}
<div class="editor-mount" style="min-height: 12rem"><textarea name="config" rows="8" spellcheck="false" data-editor-language="srccfg">{{ config_lines | join('\n') }}</textarea></div>
<textarea name="config" rows="8" spellcheck="false" data-editor-language="srccfg">{{ config_lines | join('\n') }}</textarea>
</div>
</label>
<button type="submit">Save blueprint</button>

View file

@ -24,7 +24,7 @@
<form method="post" action="/overlays/{{ overlay.id }}/script" class="stack">
<input type="hidden" name="csrf_token" value="{{ session.get('csrf_token', '') }}">
<label>Bash script
<div class="editor-mount" style="min-height: 27rem"><textarea name="script" rows="20" spellcheck="false" data-editor-language="bash">{{ overlay.script or "" }}</textarea></div>
<textarea name="script" rows="20" spellcheck="false" data-editor-language="bash">{{ overlay.script or "" }}</textarea>
</label>
<p class="muted">Runs sandboxed against the overlay directory mounted at <code>/overlay</code>.</p>
{% if not latest_build_is_running %}
@ -186,7 +186,7 @@
</label>
<label class="files-editor-field">
<span class="files-field-label">Content</span>
<div class="editor-mount" style="min-height: 19rem"><textarea class="files-editor-content" rows="14" spellcheck="false" data-editor-language="auto"></textarea></div>
<textarea class="files-editor-content" rows="14" spellcheck="false" data-editor-language="auto"></textarea>
</label>
<div class="files-editor-meta muted">
<span class="files-editor-byte-count">UTF-8 · 0 bytes</span>