Skip to content

Fit the playground in the window - #27

Merged
onatozmenn merged 1 commit into
mainfrom
the-playground-fits
Jul 31, 2026
Merged

Fit the playground in the window#27
onatozmenn merged 1 commit into
mainfrom
the-playground-fits

Conversation

@onatozmenn

Copy link
Copy Markdown
Contributor

Editing a program and reading what the compiler said about it are one task, and scrolling between the two panes made it two.

The page is a column now, the panes take whatever height is left, and each scrolls inside itself.

Only where there is room. Below 52rem the panes stack, and below 40rem tall there is nothing to fit, so both keep scrolling the page: a 26rem editor squeezed into 300 pixels is worse than a scrollbar.

An example's summary is however long its author wanted it, so it gets two lines and its own scrollbar rather than a share of the editor's.

Measured

viewport page scrolls sideways editor
1920x1080 no no 704px
1280x800 no no 424px
1280x700 no no 324px
840x660 no no 284px
380x800 yes, as before no

Checked with proven selected, whose check output is 1,738 pixels of diagnostics: it stays inside the output pane and the page does not move. Same after picking an example with a long summary, and after the share button adds a line.

The other three pages are untouched; the layout is behind a class only this page carries.

Written with AI assistance.

Editing a program and reading what the compiler said about it are one task,
and scrolling between the two panes made it two. The page is a column now,
the panes take whatever height is left, and each scrolls inside itself.

Only where there is room: below 52rem the panes stack and below 40rem tall
there is nothing to fit, so both keep scrolling the page, because a 26rem
editor squeezed into 300 pixels is worse than a scrollbar.

An example's summary is however long its author wanted it, so it gets two
lines and its own scrollbar rather than a share of the editor's.

Measured at 1920x1080, 1280x800, 1280x700 and 840x660: nothing scrolls the
page, nothing scrolls sideways, and the editor gets 704, 424, 324 and 284
pixels. Checked with `proven`, whose check output is 1,738 pixels of
diagnostics, and it stays inside the output pane.

Co-authored-by: GitHub Copilot <copilot@github.com>
@onatozmenn
onatozmenn merged commit 00bb843 into main Jul 31, 2026
1 check passed
@onatozmenn
onatozmenn deleted the the-playground-fits branch July 31, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant