Merge pull request #15221 from overleaf/ii-ide-page-prototype-file-tree-history

FileTree for history React IDE page

GitOrigin-RevId: 56fadced9f507297ba16dc54715811f36dcfd5b5
This commit is contained in:
ilkin-overleaf
2023-10-30 09:04:33 +00:00
committed by Copybot
parent edb4d7b84e
commit c39a566fe3
6 changed files with 75 additions and 34 deletions
@@ -12,6 +12,7 @@ import { useLayoutContext } from '@/shared/context/layout-context'
import { EditorPane } from '@/features/ide-react/components/editor/editor-pane'
import PlaceholderFile from '@/features/ide-react/components/layout/placeholder/placeholder-file'
import PlaceholderPdf from '@/features/ide-react/components/layout/placeholder/placeholder-pdf'
import classnames from 'classnames'
export type EditorProps = {
shouldPersistLayout?: boolean
@@ -38,9 +39,7 @@ export default function Editor({
return <PlaceholderFile />
}
if (view === 'history') {
return null
}
const historyIsOpen = view === 'history'
function setPdfIsOpen(isOpen: boolean) {
if (isOpen) {
@@ -56,6 +55,7 @@ export default function Editor({
shouldPersistLayout ? 'ide-react-editor-and-pdf-layout' : undefined
}
direction="horizontal"
className={classnames({ hide: historyIsOpen })}
>
{editorIsVisible ? (
<Panel id="editor" order={1} defaultSize={50}>