File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
packages/frontend/src/page Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ type AnyLiveDocWithRef = {
5151 docRef : DocRef ;
5252} ;
5353
54+ // The initial size of the right panel in a split as a percentage of the total available width
55+ const INITIAL_SPLIT_SIZE = 0.33 ;
56+
5457export default function DocumentPage ( ) {
5558 const api = useApi ( ) ;
5659 const models = useContext ( ModelLibraryContext ) ;
@@ -100,7 +103,7 @@ export default function DocumentPage() {
100103 const context = resizableContext ( ) ;
101104 if ( isSidePanelOpen ( ) ) {
102105 context ?. expand ( 1 ) ;
103- context ?. resize ( 1 , 0.33 ) ;
106+ context ?. resize ( 1 , INITIAL_SPLIT_SIZE ) ;
104107 } else {
105108 context ?. collapse ( 1 ) ;
106109 context ?. resize ( 0 , 1 ) ;
@@ -163,6 +166,7 @@ export default function DocumentPage() {
163166 < ResizableHandle class = "resizeable-handle" />
164167 < Resizable . Panel
165168 class = "content-panel"
169+ initialSize = { INITIAL_SPLIT_SIZE }
166170 minSize = { 0.25 }
167171 onCollapse = { closeSidePanel }
168172 >
You can’t perform that action at this time.
0 commit comments