File tree Expand file tree Collapse file tree
workspace/[workspaceId]/files/components/file-viewer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,9 +66,9 @@ export function PublicFileView({
6666 )
6767
6868 return (
69- < div className = 'light desktop-title-bar-page flex flex-col bg-[var(--bg)]' >
69+ < div className = 'light desktop-title-bar-page flex h-screen flex-col overflow-hidden bg-[var(--bg)]' >
7070 < DesktopTitleBarLane />
71- < header className = 'sticky top-[var(--desktop-title-bar-height)] z-10 flex items-center justify-between gap-4 border-[var(--border)] border-b bg-[var(--bg)] px-4 py-3' >
71+ < header className = 'z-10 flex shrink-0 items-center justify-between gap-4 border-[var(--border)] border-b bg-[var(--bg)] px-4 py-3' >
7272 < div className = 'flex min-w-0 items-center gap-3' >
7373 { ! brand . logoUrl && (
7474 < >
Original file line number Diff line number Diff line change @@ -284,11 +284,12 @@ const ReadOnlyTextPreview = memo(function ReadOnlyTextPreview({
284284
285285 const resolvedError = resolvePreviewError ( ( error as Error | null ) ?? null , null )
286286 if ( resolvedError ) return < PreviewError label = 'file' error = { resolvedError } />
287- if ( isLoading || content == null ) return < PreviewLoadingFrame className = 'h-full' tone = 'surface' />
287+ if ( isLoading || content == null )
288+ return < PreviewLoadingFrame className = 'min-h-0 flex-1' tone = 'surface' />
288289
289290 if ( resolvePreviewType ( file . type , file . name ) ) {
290291 return (
291- < div className = 'h-full min-h-0 w-full overflow-auto' >
292+ < div className = 'flex min-h-0 w-full flex-1 flex-col overflow-auto' >
292293 < PreviewPanel
293294 content = { content }
294295 mimeType = { file . type }
@@ -302,7 +303,7 @@ const ReadOnlyTextPreview = memo(function ReadOnlyTextPreview({
302303 }
303304
304305 return (
305- < div className = 'h-full min-h-0 w-full overflow-auto bg-[var(--surface-1)] p-4' >
306+ < div className = 'min-h-0 w-full flex-1 overflow-auto bg-[var(--surface-1)] p-4' >
306307 < pre className = 'whitespace-pre-wrap break-words font-mono text-[13px] text-[var(--text-body)]' >
307308 { content }
308309 </ pre >
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ const HtmlPreview = memo(function HtmlPreview({ content }: { content: string })
200200 } , [ ] )
201201
202202 return (
203- < div ref = { containerRef } className = 'h-full overflow-hidden' >
203+ < div ref = { containerRef } className = 'flex min-h-0 flex-1 overflow-hidden' >
204204 { isRenderable && (
205205 < iframe
206206 key = { resumeNonce }
@@ -225,7 +225,7 @@ function SvgPreview({ content }: { content: string }) {
225225 } , [ content ] )
226226
227227 return (
228- < ZoomablePreview className = 'h-full ' contentClassName = 'h-full w-full' >
228+ < ZoomablePreview className = 'min-h-0 flex-1 ' contentClassName = 'h-full w-full' >
229229 { blobUrl && (
230230 < img
231231 src = { blobUrl }
@@ -240,7 +240,7 @@ function SvgPreview({ content }: { content: string }) {
240240
241241function MermaidFilePreview ( { content, isStreaming } : { content : string ; isStreaming ?: boolean } ) {
242242 return (
243- < div className = 'h-full overflow-auto p-6' >
243+ < div className = 'min-h-0 flex-1 overflow-auto p-6' >
244244 < MermaidDiagram
245245 definition = { content }
246246 isStreaming = { isStreaming }
@@ -267,14 +267,14 @@ const CsvPreview = memo(function CsvPreview({
267267
268268 if ( headers . length === 0 ) {
269269 return (
270- < div className = 'flex h-full items-center justify-center p-6' >
270+ < div className = 'flex min-h-0 flex-1 items-center justify-center p-6' >
271271 < p className = 'text-[13px] text-[var(--text-muted)]' > No data to display</ p >
272272 </ div >
273273 )
274274 }
275275
276276 return (
277- < div className = 'h-full overflow-auto p-6' >
277+ < div className = 'min-h-0 flex-1 overflow-auto p-6' >
278278 < DataTable headers = { headers } rows = { rows } />
279279 </ div >
280280 )
Original file line number Diff line number Diff line change @@ -672,7 +672,10 @@ export const TextEditor = memo(function TextEditor({
672672 </ div >
673673 ) }
674674 < div
675- className = { cn ( 'min-w-0 flex-1 overflow-hidden' , isResizing && 'pointer-events-none' ) }
675+ className = { cn (
676+ 'flex min-w-0 flex-1 flex-col overflow-hidden' ,
677+ isResizing && 'pointer-events-none'
678+ ) }
676679 >
677680 < PreviewPanel
678681 key = { previewContextKey ? `${ file . id } :${ previewContextKey } ` : file . id }
You can’t perform that action at this time.
0 commit comments