fix(file-manager): apply compact density to directory tree (#1478)

* fix(file-manager): apply compact density to directory tree

* test(css): exercise the configured PostCSS plugin chain
This commit is contained in:
ZacharyZcR authored and GitHub committed 2026-09-27 00:10:28 -05:00
1 parent 2a2ba2f790
commit 322f811f2c
2 files changed
+9 -1

No files matched your search

@@ -3469,6 +3469,7 @@ function FileManagerContent({
> >
<div className="flex-1 flex flex-col overflow-hidden min-h-0 border border-border bg-card"> <div className="flex-1 flex flex-col overflow-hidden min-h-0 border border-border bg-card">
<FileManagerSidebar <FileManagerSidebar
density={density}
currentHost={currentHost} currentHost={currentHost}
currentPath={currentPath} currentPath={currentPath}
onPathChange={navigateTo} onPathChange={navigateTo}
@@ -79,6 +79,7 @@ export interface SidebarItem {
} }
interface FileManagerSidebarProps { interface FileManagerSidebarProps {
density?: "comfortable" | "compact";
currentHost: SSHHost; currentHost: SSHHost;
currentPath: string; currentPath: string;
onPathChange: (path: string) => void; onPathChange: (path: string) => void;
@@ -179,6 +180,7 @@ function StorageMeter({
// ─── Component ───────────────────────────────────────────────────────────────── // ─── Component ─────────────────────────────────────────────────────────────────
export function FileManagerSidebar({ export function FileManagerSidebar({
density = "comfortable",
currentHost, currentHost,
currentPath, currentPath,
onPathChange, onPathChange,
@@ -638,7 +640,12 @@ export function FileManagerSidebar({
* the async fetch fills it in. * the async fetch fills it in.
*/ */
const renderFolderTreeItem = (item: SidebarItem): React.ReactNode => ( const renderFolderTreeItem = (item: SidebarItem): React.ReactNode => (
<FolderTree.Item key={item.id} id={item.id} label={item.name}> <FolderTree.Item
key={item.id}
id={item.id}
label={item.name}
className={density === "compact" ? "py-0.5" : undefined}
>
<FolderTree.Content> <FolderTree.Content>
{item.children?.map((child) => renderFolderTreeItem(child))} {item.children?.map((child) => renderFolderTreeItem(child))}
</FolderTree.Content> </FolderTree.Content>