mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-08-26 13:06:32 +00:00
fix(detail-split-layout): pass panel sizes as % strings, not bare numbers
react-resizable-panels v4 reads numeric size props as PIXELS, not percent
("Numeric values are assumed to be pixels"). So `minSize={30}` was a 30px
floor — a user could drag either panel down to a ~30px sliver (~2.5% on a
1184px group) instead of the intended 30%. `defaultSize={45/55}` were px too
(they only rendered ~45/55% because default sizes normalize to a ratio;
minSize is an absolute per-panel constraint and is not normalized).
Use string percentages so the constraints mean what they read: minSize "30%",
defaultSize "45%"/"55%".
Verified live (chrome-devtools @1440px): separator aria-valuemin 2.536 -> 30;
dragging a panel to its minimum now floors at 29.97% (355px) instead of 30px.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
cc908e5108
commit
a55cac3225
@@ -21,8 +21,8 @@ export function DetailSplitLayout({
|
||||
orientation="horizontal"
|
||||
>
|
||||
<ResizablePanel
|
||||
defaultSize={45}
|
||||
minSize={30}
|
||||
defaultSize="45%"
|
||||
minSize="30%"
|
||||
>
|
||||
<div className="bg-card h-full min-h-0 overflow-y-auto">
|
||||
<Card className="mx-auto min-h-full w-full max-w-2xl rounded-none border-0">
|
||||
@@ -32,8 +32,8 @@ export function DetailSplitLayout({
|
||||
</ResizablePanel>
|
||||
<ResizableHandle withHandle />
|
||||
<ResizablePanel
|
||||
defaultSize={55}
|
||||
minSize={30}
|
||||
defaultSize="55%"
|
||||
minSize="30%"
|
||||
>
|
||||
<div className={contentClassName}>{content}</div>
|
||||
</ResizablePanel>
|
||||
|
||||
Reference in New Issue
Block a user