Repository navigation
Let the candidate resize the test results panel - #303
Conversation
|
|
||
| .test-drawer { | ||
| display: flex; | ||
| flex: 0 0 var(--test-drawer-height, auto); |
There was a problem hiding this comment.
With a saved height the drawer keeps its fixed flex-basis when #results-toggle collapses #results-body, so collapsing the results leaves an empty block under the toggle instead of giving the room back to the editor as it did before. Let a collapsed drawer size to its content, e.g. .test-drawer:has(#results-body[hidden]) { flex-basis: auto; }, and report the measured height in aria-valuenow while collapsed.
| storageKey: SIDEBAR_WIDTH_KEY, | ||
| bounds: sidebarBounds, | ||
| }); | ||
| attachSplitter({ |
There was a problem hiding this comment.
When execution is disabled, renderRuntimeConfig hides .test-drawer but not #test-drawer-resizer, and .test-drawer-resizer { display: block } shows it at every width. The candidate gets a 1rem divider in the tab order that resizes nothing, and an arrow key there saves a height measured against the hidden drawer (bounds collapse to 0), which a later session with execution on then restores. Hide the handle next to the drawer with nodes.testDrawerResizer.hidden = !editorOptions.execution.
| summary.getBoundingClientRect().bottom - | ||
| drawerTop + | ||
| nodes.resultsToggle.getBoundingClientRect().height; | ||
| const room = |
There was a problem hiding this comment.
room depends on the editor toolbar's height, which changes without any window resize: the sidebar divider narrowing the panel until the toolbar wraps, or applyLanguages(spec) filling the tabs in after init(). attachSplitter reclamps only on window resize, so a saved height can exceed the new max and leave the editor under 6rem until the window changes size. As a follow-up in web/splitter.js, reclamp from a ResizeObserver on the editor stack, the way compactJimStageBesideNarrowPanel already watches its panel.
ColtenOuO
left a comment
There was a problem hiding this comment.
Please squash the commit.
f945daf to
d7778ac
Compare
The fixed drawer can hide long compiler output during an interview. Add an accessible splitter that preserves the selected height while keeping the editor, controls, and collapsed drawer usable.
d7778ac to
ea26024
Compare
|
Thank @domin67 for contributing! |
The fixed drawer can hide long compiler output during an interview. Allow candidates to trade editor space for results while keeping both areas usable and preserving the selected height.
Summary
Testing
Closes #94
Summary by cubic
Lets candidates resize the test results panel during an interview, so long compiler output no longer gets hidden by the fixed drawer. Adds a draggable splitter with keyboard support that preserves the selected height, while bounds keep both the editor and results area usable.
localStorage.Written for commit ea26024. Summary will update on new commits.