feat: split view (horizontal + vertical)#2
Merged
Merged
Conversation
…ientations Two-pane reader layout: side-by-side or stacked. Each pane owns its own tabs, scroll position, and external-change banner. The outline tracks whichever pane is focused. - New usePanes hook composes two useTabs instances and persists the PaneLayout (split mode, divider size, active pane). Pane 0 reuses the legacy tabsState storage key so existing tabs migrate with no user action; pane 1 lives under tabsState.pane1. - Header toggle group switches between single, horizontal, and vertical. Cmd+\ toggles horizontal, Cmd+Shift+\ toggles vertical, Cmd+1 / Cmd+2 focus a pane. Shortcuts no-op while typing in inputs. - "Open in other pane" context-menu entry auto-enables horizontal split when collapsed and routes the file to the inactive pane. - ResizablePanelGroup driven by the v4 react-resizable-panels API (orientation prop, onLayoutChanged with named panel ids). - Collapsing back to single keeps pane 1's tabs in storage so the layout round-trips losslessly across toggles.
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.
Summary
Two-pane reader layout for DocsReader. The user can toggle between single, side-by-side, and stacked, drag the splitter to resize, and each pane keeps its own tabs, scroll position, and external-change banner.
usePaneshook composes twouseTabsinstances and persists thePaneLayouttabsStatestorage key for zero-migration backward compat; pane 1 stores undertabsState.pane1Cmd+\horizontal,Cmd+Shift+\vertical,Cmd+1/Cmd+2focus pane 0 / pane 1 (no-op inside form inputs)react-resizable-panelsv4 (orientation+onLayoutChangedwith named panel ids)Test plan
bun run build(tsc + vite) cleancargo checkcleantabsStaterestores into pane 0 with split offScreenshots
See README -
docs/screenshots/split.png(light),split-dark.png(dark side-by-side),horizontal-split.png(dark stacked).