Skip to content

Commit a7514d7

Browse files
committed
Increase changed files min-height for a roomier feel
Increase the minimum height of the changed files section from 5 to 8 to improve visibility and accommodate more content without scrolling. This change enhances the user experience by reducing the need for frequent resizing or scrolling in the stack view component.
1 parent 91c26d9 commit a7514d7

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

apps/desktop/src/components/Resizer.svelte

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,31 @@
113113
let overflow: number;
114114
switch (direction) {
115115
case 'down':
116-
newValue = Math.min(Math.max(value, minHeight), maxHeight);
116+
newValue =
117+
minHeight > maxHeight
118+
? Math.max(value, minHeight)
119+
: Math.min(Math.max(value, minHeight), maxHeight);
117120
overflow = minHeight - value;
118121
break;
119122
case 'up':
120-
newValue = Math.min(Math.max(value, minHeight), maxHeight);
123+
newValue =
124+
minHeight > maxHeight
125+
? Math.max(value, minHeight)
126+
: Math.min(Math.max(value, minHeight), maxHeight);
121127
overflow = minHeight - value;
122128
break;
123129
case 'right':
124-
newValue = Math.min(Math.max(value, minWidth), maxWidth);
130+
newValue =
131+
minWidth > maxWidth
132+
? Math.max(value, minWidth)
133+
: Math.min(Math.max(value, minWidth), maxWidth);
125134
overflow = minWidth - value;
126135
break;
127136
case 'left':
128-
newValue = Math.min(Math.max(value, minWidth), maxWidth);
137+
newValue =
138+
minWidth > maxWidth
139+
? Math.max(value, minWidth)
140+
: Math.min(Math.max(value, minWidth), maxWidth);
129141
overflow = minWidth - value;
130142
break;
131143
}

apps/desktop/src/components/StackView.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
let actualDetailsHeight = $state<number>(0);
142142
let actualDetailsHeightRem = $derived(pxToRem(actualDetailsHeight, zoom));
143143
144-
let minChangedFilesHeight = $state(5);
144+
let minChangedFilesHeight = $state(8);
145145
let minPreviewHeight = $derived(previewChangeResult ? 7 : 0);
146146
147147
let maxChangedFilesHeight = $derived(

0 commit comments

Comments
 (0)