Fit the playground in the window - #27
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Checked with
provenselected, 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.