Repository navigation
feat: add ResizablePanels - #423
Open
andrewhuhh wants to merge 2 commits into
Open
andrewhuhh wants to merge 2 commits into
andrewhuhh wants to merge 2 commits into
Conversation
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
Confidence Score: 5/5
[Low impact] The PR appears safe to merge; all four previous findings are fixed, and no new actionable issues were found.
|
… track the dragging pointer Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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.
Adds
ResizablePanels, a two-panel split with a separator you can drag or move from the keyboard. Use it for a list beside its details (direction="horizontal") or an editor above its results (direction="vertical").The start panel takes
defaultSizepercent of the container (50 by default), andminSizessets the smallest share each panel can shrink to. PasssizeandonSizeChangeto control it. The separator is a focusablerole="separator"witharia-orientation,aria-valuenow,aria-valueminandaria-valuemax. Arrow keys move it in 5% steps, Home and End jump to the limits, and double-clicking it restores the default. Dragging uses pointer capture, so it keeps tracking when the pointer leaves the bar. The bar is a hairline that darkens on hover and while dragging, shows the standard focus ring, and uses the col-resize or row-resize cursor.On narrow screens a side-by-side split stacks once its container is 40rem or narrower. The panels flow top to bottom at their natural height, a hairline separates them, and the separator is removed because there is nothing left to resize. A vertical split keeps resizing at every width.
The new Resizable panels page shows a list beside details, an editor over results, and empty and long-content states. It adds visual baselines for that page and doesn't change any existing ones.