Skip to content

Commit efb9f20

Browse files
fix(file-tree): remove restrictive minHeight to enable width resizing and eliminate empty space, establish min height from 120 to 50
1 parent 8a93fa9 commit efb9f20

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/common/components/mock-components/front-rich-components/file-tree/file-tree.business.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,11 @@ export const calculateFileTreeDynamicSize = (
143143
// Calculate minimum height required based on content
144144
const minContentHeight = treeItems.length * elementHeight + paddingY * 2;
145145

146-
// Create dynamic constraints with adaptive minimum height
146+
// Create dynamic constraints for content-based sizing
147147
const dynamicRestrictions: ShapeSizeRestrictions = {
148148
...baseRestrictions,
149149
minWidth: Math.max(baseRestrictions.minWidth, requiredWidth),
150-
minHeight: minContentHeight,
151-
defaultHeight: Math.max(
152-
baseRestrictions.defaultHeight || 200,
153-
minContentHeight
154-
),
150+
defaultHeight: minContentHeight,
155151
};
156152

157153
const finalHeight = minContentHeight;

src/common/components/mock-components/front-rich-components/file-tree/file-tree.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { useFileTreeResize } from './file-tree-resize.hook';
1616

1717
const fileTreeShapeRestrictions: ShapeSizeRestrictions = {
1818
minWidth: 150,
19-
minHeight: 120,
19+
minHeight: 50,
2020
maxWidth: -1,
2121
maxHeight: -1,
2222
defaultWidth: 230,

0 commit comments

Comments
 (0)