fix: persist layout panel widths
This commit is contained in:
@@ -23,7 +23,7 @@ describe('getMainWindowMinWidth', () => {
|
||||
noteListVisible: true,
|
||||
inspectorCollapsed: true,
|
||||
},
|
||||
expectedWidth: 880,
|
||||
expectedWidth: 920,
|
||||
},
|
||||
{
|
||||
name: 'drops to the narrower editor-only floor when only the editor is visible',
|
||||
@@ -52,6 +52,18 @@ describe('getMainWindowMinWidth', () => {
|
||||
},
|
||||
expectedWidth: 720,
|
||||
},
|
||||
{
|
||||
name: 'uses restored pane widths when they exceed the minimum allowances',
|
||||
visibility: {
|
||||
sidebarVisible: true,
|
||||
noteListVisible: true,
|
||||
inspectorCollapsed: false,
|
||||
sidebarWidth: 360,
|
||||
noteListWidth: 340,
|
||||
inspectorWidth: 320,
|
||||
},
|
||||
expectedWidth: 1500,
|
||||
},
|
||||
] as const
|
||||
|
||||
it.each(minWidthCases)('$name', ({ visibility, expectedWidth }) => {
|
||||
@@ -82,7 +94,7 @@ describe('useMainWindowSizeConstraints', () => {
|
||||
noteListVisible: true,
|
||||
inspectorCollapsed: false,
|
||||
},
|
||||
expectedWidth: 1120,
|
||||
expectedWidth: 1160,
|
||||
},
|
||||
] as const
|
||||
|
||||
|
||||
Reference in New Issue
Block a user