Make the Web UI console resizable

The instance console was locked to a fixed 300px height. It can now be
drag-resized vertically (native resize handle), and the chosen height is
persisted with useLocalStorage so it is restored on the next visit.

Both the height and the scroll-anchor padding are driven by a
--console-height CSS variable, so the pin-to-bottom behaviour keeps working
at any size.

Closes #938

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 4.8 committed 2026-06-26 14:47:32 +00:00
1 parent a274fe74e1
commit 3fe0c85055
2 files changed
+40 -4

No files matched your search

+9 -3
View File
@@ -171,13 +171,19 @@ body {
margin: 0;
background: #000;
border-color: #252525;
height: 300px;
/* Height is driven by --console-height (set from the persisted user choice)
so the console can be drag-resized; the resize handle needs a non-visible
overflow, which overflow-y: scroll provides. */
height: var(--console-height, 300px);
min-height: 100px;
resize: vertical;
overflow-y: scroll;
white-space: pre-wrap;
/* Make sure there's at least one pixel of scroll space, this */
/* is necessary for the view to stick on the scroll anchor. */
padding-top: 300px;
/* is necessary for the view to stick on the scroll anchor. Tracks the */
/* height so the pin-to-bottom keeps working at any size. */
padding-top: var(--console-height, 300px);
}
.instance-console .factorio-time {