fix: persist layout panel widths

This commit is contained in:
lucaronin
2026-04-30 15:53:32 +02:00
parent d53c3fa7e5
commit 0331b40ae2
10 changed files with 245 additions and 32 deletions

View File

@@ -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