-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: complete pages editor not clickable, recent pages calculation lo…
…gic (#2820) * fix: whole editor not clickable * fix: recent pages calculation * chore: update older pages calculation logic in recent pages list * fix: archived pages computed function * chore: add type for older pages
- Loading branch information
Showing
8 changed files
with
89 additions
and
56 deletions.
There are no files selected for viewing
53 changes: 33 additions & 20 deletions
53
packages/editor/document-editor/src/ui/components/page-renderer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,46 @@ | ||
import { EditorContainer, EditorContentWrapper } from "@plane/editor-core" | ||
import { Editor } from "@tiptap/react" | ||
import { DocumentDetails } from "../types/editor-types" | ||
import { EditorContainer, EditorContentWrapper } from "@plane/editor-core"; | ||
import { Editor } from "@tiptap/react"; | ||
import { DocumentDetails } from "../types/editor-types"; | ||
|
||
interface IPageRenderer { | ||
sidePeakVisible: boolean, | ||
documentDetails: DocumentDetails , | ||
editor: Editor, | ||
editorClassNames: string, | ||
editorContentCustomClassNames?: string | ||
sidePeakVisible: boolean; | ||
documentDetails: DocumentDetails; | ||
editor: Editor; | ||
editorClassNames: string; | ||
editorContentCustomClassNames?: string; | ||
} | ||
|
||
export const PageRenderer = ({ sidePeakVisible, documentDetails, editor, editorClassNames, editorContentCustomClassNames }: IPageRenderer) => { | ||
export const PageRenderer = ({ | ||
sidePeakVisible, | ||
documentDetails, | ||
editor, | ||
editorClassNames, | ||
editorContentCustomClassNames, | ||
}: IPageRenderer) => { | ||
return ( | ||
<div className={`flex h-[88vh] flex-col w-full max-md:w-full max-md:ml-0 transition-all duration-200 ease-in-out ${sidePeakVisible ? 'ml-[3%] ' : 'ml-0'}`}> | ||
<div | ||
className={`flex h-[88vh] flex-col w-full max-md:w-full max-md:ml-0 transition-all duration-200 ease-in-out ${ | ||
sidePeakVisible ? "ml-[3%] " : "ml-0" | ||
}`} | ||
> | ||
<div className="items-start mt-4 h-full flex flex-col w-fit max-md:max-w-full overflow-auto"> | ||
<div className="flex flex-col py-2 max-md:max-w-full"> | ||
<h1 | ||
className="border-none outline-none bg-transparent text-4xl font-bold leading-8 tracking-tight self-center w-[700px] max-w-full" | ||
>{documentDetails.title}</h1> | ||
<h1 className="border-none outline-none bg-transparent text-4xl font-bold leading-8 tracking-tight self-center w-[700px] max-w-full"> | ||
{documentDetails.title} | ||
</h1> | ||
</div> | ||
<div className="border-custom-border border-b border-solid self-stretch w-full h-0.5 mt-3" /> | ||
<div className="flex flex-col max-md:max-w-full"> | ||
<div className="border-b border-custom-border-200 self-stretch w-full h-0.5 mt-3" /> | ||
<div className="flex flex-col h-full w-full max-md:max-w-full"> | ||
<EditorContainer editor={editor} editorClassNames={editorClassNames}> | ||
<div className="flex flex-col"> | ||
<EditorContentWrapper editor={editor} editorContentCustomClassNames={editorContentCustomClassNames} /> | ||
<div className="flex flex-col h-full w-full"> | ||
<EditorContentWrapper | ||
editor={editor} | ||
editorContentCustomClassNames={editorContentCustomClassNames} | ||
/> | ||
</div> | ||
</EditorContainer > | ||
</EditorContainer> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters