Conversation
This branch has not been deployed
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.
Description
Adds drag-to-resize to the left file browser and the right outline, so the two panels are no longer stuck at their fixed widths (260 px and 220 px). Long folder names and deep heading text used to get truncated with no way to adapt the layout; each panel now gets a thin drag handle — drag to change its width, double-click to reset to the default, and the chosen width is remembered across launches.
Demo
Changes
Left sidebar (
1dcb29e)#sidebar-resizerhandle sits between the sidebar and the content area: a 6 px invisible strip that lights up on hover/drag and shows acol-resizecursorsetPointerCapture, so releasing the pointer outside the window still ends the drag cleanly — no stuckcol-resizecursor--sidebar-widthCSS variable (shared bywidthandmin-width), clamped to 160–640 px; double-click restores the 260 px defaultsidebarWidthkey in the existingsettings.jsonstore and restored on launchpreferences.tshelpers —isValidSidebarWidth,resolveInitialSidebarWidth,applySidebarWidthToDOM— plus 5 unit testsRight outline (
2a17649)#outlinevia#outline-resizer, with the drag direction inverted (dragging right shrinks it) because the handle sits on the panel's left edge; range 160–480 px, default 220 pxbuildOutline, and hidden when the outline preference is "hidden"@media printandbody.print-modehide lists so print/PDF export never leaks a stray 6 px stripoutlineWidthkey +preferences.tshelpers (isValidOutlineWidth,resolveInitialOutlineWidth,applyOutlineWidthToDOM) + 5 unit testsVerification
npx tsc --noEmitpassesnpm test: 327 tests pass (10 new — 5 per panel)npm run buildsucceedsNotes for review: no README/docs changes — resizable panels are a standard, self-explanatory affordance and the README doesn't document panel widths. The two panels share the same implementation shape (CSS variable + pointer-capture drag + store persistence) but are intentionally kept separate rather than over-abstracted, mirroring how the existing preference helpers are laid out.
Type of Change
Checklist