@@ -44,6 +44,7 @@ export class DevtoolsWorkbench extends Element {
4444 #dragVertical = new DragController ( this , {
4545 localStorageKey : 'toolbarHeight' ,
4646 minPosition : MIN_WORKBENCH_HEIGHT ,
47+ maxPosition : ( window . innerHeight * 0.7 ) ,
4748 initialPosition : window . innerHeight * .7 , // initial height of browser window is 70% of window
4849 getContainerEl : ( ) => this . getShadowRootAsync ( ) as any as Element ,
4950 direction : Direction . vertical
@@ -91,14 +92,13 @@ export class DevtoolsWorkbench extends Element {
9192 // When collapsed keep previous full behavior; when expanded no fixed height class
9293 const heightWorkbench = this . #toolbarCollapsed ? 'h-full flex-1' : ''
9394
94- // Convert the drag position (e.g. "top: 334px") into a concrete height
9595 const styleWorkbench = this . #toolbarCollapsed ? '' : ( ( ) => {
9696 const HANDLE_HEIGHT = 10
9797 const m = this . #dragVertical. getPosition ( ) . match ( / ( \d + (?: \. \d + ) ? ) p x / )
9898 const raw = m ? parseFloat ( m [ 1 ] ) : window . innerHeight * 0.7
99- const paneHeight = raw + HANDLE_HEIGHT
100- const capped = Math . min ( paneHeight , window . innerHeight * 0.7 )
101- return `flex:0 0 auto; flex-basis: ${ capped } px; height:${ capped } px; max-height:70vh; min-height:0;`
99+ const capped = Math . min ( raw , window . innerHeight * 0.7 )
100+ const paneHeight = Math . max ( MIN_WORKBENCH_HEIGHT , capped - HANDLE_HEIGHT )
101+ return `flex:0 0 ${ paneHeight } px; height:${ paneHeight } px; max-height:calc( 70vh - ${ HANDLE_HEIGHT } px) ; min-height:0;`
102102 } ) ( )
103103
104104 const sidebarStyle = ! this . #workbenchSidebarCollapsed
@@ -137,10 +137,10 @@ export class DevtoolsWorkbench extends Element {
137137 : nothing
138138 }
139139 </ section >
140+ ${ ! this . #workbenchSidebarCollapsed ? this . #dragHorizontal. getSlider ( ) : nothing }
140141 < section class ="basis-auto text-gray-500 flex items-center justify-center flex-grow ">
141142 < wdio-devtools-browser > </ wdio-devtools-browser >
142143 </ section >
143- ${ ! this . #workbenchSidebarCollapsed ? this . #dragHorizontal. getSlider ( ) : nothing }
144144 </ section >
145145 ${ ! this . #toolbarCollapsed ? this . #dragVertical. getSlider ( ) : nothing }
146146 < wdio-devtools-tabs cacheId ="activeWorkbenchTab " class ="border-t-[1px] border-t-panelBorder ${ this . #toolbarCollapsed ? 'hidden' : '' } flex-1 min-h-0 ">
0 commit comments