fix(sidebar): use available width for table names

This commit is contained in:
t8y2 committed 2026-07-13 20:34:27 +08:00
1 parent dabbb58b0e
commit 99b84cbc92
3 files changed
+17 -3

No files matched your search

@@ -56,6 +56,11 @@ export function usesFullWidthTreeLabel(type: TreeNodeType, allowHorizontalScroll
return allowHorizontalScroll && fullWidthLabelTypes.has(type);
}
export function treeLabelWidthClass({ fullWidth, hasTrailingComment }: { fullWidth: boolean; hasTrailingComment: boolean }): string {
if (fullWidth) return "shrink-0 whitespace-nowrap";
return hasTrailingComment ? "min-w-0 flex-1 truncate" : "min-w-0 truncate";
}
export function canTreeNodeExpand(type: TreeNodeType): boolean {
return !leafTypes.has(type);
}