@@ -48,10 +48,12 @@ import { Paragraph } from "~/components/primitives/Paragraph";
4848import { Popover , PopoverArrowTrigger , PopoverContent } from "~/components/primitives/Popover" ;
4949import * as Property from "~/components/primitives/PropertyTable" ;
5050import {
51+ RESIZABLE_PANEL_ANIMATION ,
5152 ResizableHandle ,
5253 ResizablePanel ,
5354 ResizablePanelGroup ,
5455 type ResizableSnapshot ,
56+ collapsibleHandleClassName ,
5557} from "~/components/primitives/Resizable" ;
5658import { ShortcutKey , variants } from "~/components/primitives/ShortcutKey" ;
5759import { Slider } from "~/components/primitives/Slider" ;
@@ -112,7 +114,7 @@ import { SpanView } from "../resources.orgs.$organizationSlug.projects.$projectP
112114
113115const resizableSettings = {
114116 parent : {
115- autosaveId : "panel-run-parent" ,
117+ autosaveId : "panel-run-parent-v2 " ,
116118 handleId : "parent-handle" ,
117119 main : {
118120 id : "run" ,
@@ -542,24 +544,36 @@ function TraceView({
542544 treeSnapshot = { resizable . tree as ResizableSnapshot }
543545 />
544546 </ ResizablePanel >
545- < ResizableHandle id = { resizableSettings . parent . handleId } />
546- { selectedSpanId && (
547- < ResizablePanel
548- id = { resizableSettings . parent . inspector . id }
549- default = { resizableSettings . parent . inspector . default }
550- min = { resizableSettings . parent . inspector . min }
551- isStaticAtRest
547+ < ResizableHandle
548+ id = { resizableSettings . parent . handleId }
549+ className = { collapsibleHandleClassName ( ! ! selectedSpanId ) }
550+ />
551+ < ResizablePanel
552+ id = { resizableSettings . parent . inspector . id }
553+ default = { resizableSettings . parent . inspector . default }
554+ min = { resizableSettings . parent . inspector . min }
555+ className = "overflow-hidden"
556+ collapsible
557+ collapsed = { ! selectedSpanId }
558+ onCollapseChange = { ( ) => { } }
559+ collapsedSize = "0px"
560+ collapseAnimation = { RESIZABLE_PANEL_ANIMATION }
561+ >
562+ < div
563+ className = "h-full"
564+ style = { { minWidth : parseInt ( resizableSettings . parent . inspector . min ) } }
552565 >
553- { " " }
554- < SpanView
555- runParam = { run . friendlyId }
556- spanId = { selectedSpanId }
557- spanOverrides = { spanOverrides as SpanOverride | undefined }
558- closePanel = { ( ) => replaceSearchParam ( "span" ) }
559- linkedRunId = { selectedSpanLinkedRunId }
560- />
561- </ ResizablePanel >
562- ) }
566+ { selectedSpanId && (
567+ < SpanView
568+ runParam = { run . friendlyId }
569+ spanId = { selectedSpanId }
570+ spanOverrides = { spanOverrides as SpanOverride | undefined }
571+ closePanel = { ( ) => replaceSearchParam ( "span" ) }
572+ linkedRunId = { selectedSpanLinkedRunId }
573+ />
574+ ) }
575+ </ div >
576+ </ ResizablePanel >
563577 </ ResizablePanelGroup >
564578 </ div >
565579 ) ;
0 commit comments