Allow horizontal scrolling in File Explorer

This commit is contained in:
Alex Gleason committed 2025-09-12 13:47:48 -05:00
1 parent 8e727b0b63
commit 9538c72c99
2 files changed
+18 -12

No files matched your search

+1 -1
View File
@@ -206,7 +206,7 @@ export function FileTree({ projectId, onFileSelect, selectedFile }: FileTreeProp
<File className={cn("h-4 w-4 text-gray-500 flex-shrink-0", gitignoreClasses)} />
</>
)}
<span className={cn("text-sm truncate", gitStatusClasses, gitignoreClasses)}>{node.name}</span>
<span className={cn("text-sm whitespace-nowrap", gitStatusClasses, gitignoreClasses)}>{node.name}</span>
</div>
{node.type === 'directory' && node.isOpen && node.children && (
+17 -11
View File
@@ -2,7 +2,7 @@ import { useState, useEffect, useCallback, useRef } from 'react';
import { useProjectsManager } from '@/hooks/useProjectsManager';
import { useFS } from '@/hooks/useFS';
import { Tabs, TabsContent } from '@/components/ui/tabs';
import { ScrollArea } from '@/components/ui/scroll-area';
import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area';
import { Button } from '@/components/ui/button';
import { RefreshCw, FolderOpen, ArrowLeft } from 'lucide-react';
import { useIsMobile } from '@/hooks/useIsMobile';
@@ -360,11 +360,14 @@ export function PreviewPane({ projectId, activeTab }: PreviewPaneProps) {
</div>
</div>
<ScrollArea className="flex-1">
<FileTree
projectId={projectId}
onFileSelect={handleFileSelect}
selectedFile={selectedFile}
/>
<ScrollBar orientation="horizontal" />
<div className="min-w-max">
<FileTree
projectId={projectId}
onFileSelect={handleFileSelect}
selectedFile={selectedFile}
/>
</div>
</ScrollArea>
</>
) : (
@@ -424,11 +427,14 @@ export function PreviewPane({ projectId, activeTab }: PreviewPaneProps) {
</div>
</div>
<ScrollArea className="h-[calc(100%-60px)]">
<FileTree
projectId={projectId}
onFileSelect={handleFileSelect}
selectedFile={selectedFile}
/>
<ScrollBar orientation="horizontal" />
<div className="min-w-max">
<FileTree
projectId={projectId}
onFileSelect={handleFileSelect}
selectedFile={selectedFile}
/>
</div>
</ScrollArea>
</div>