fix: adding ai assistance to pages (#2905)

* fix: adding ai modal to pages

* fix: pages overflow

* chore: update pages UI

* fix: updating page description while using ai assistance

* fix: gpt assistant modal height and position

---------

Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
This commit is contained in:
sriram veeraghanta 2023-11-27 20:39:18 +05:30
parent 10cde58363
commit d84e043c93
7 changed files with 134 additions and 80 deletions

View file

@ -46,7 +46,7 @@ export const EditorHeader = (props: IEditorHeader) => {
return (
<div className="flex items-center border-b border-custom-border-200 py-2 px-5">
<div className="flex-shrink-0 w-56 lg:w-80">
<div className="flex-shrink-0 w-56 lg:w-72">
<SummaryPopover
editor={editor}
markings={markings}

View file

@ -7,7 +7,7 @@ export const HeadingComp = ({
}) => (
<h3
onClick={onClick}
className="ml-4 mt-3 cursor-pointer text-sm font-bold font-medium leading-[125%] tracking-tight hover:text-custom-primary max-md:ml-2.5"
className="ml-4 mt-3 cursor-pointer text-sm font-medium leading-[125%] tracking-tight hover:text-custom-primary max-md:ml-2.5"
role="button"
>
{heading}

View file

@ -19,7 +19,7 @@ export const PageRenderer = (props: IPageRenderer) => {
return (
<div className="w-full pl-7 pt-5 pb-64">
<h1 className="text-4xl font-bold break-all pr-5 -mt-2">
<h1 className="text-4xl font-bold break-words pr-5 -mt-2">
{documentDetails.title}
</h1>
<div className="flex flex-col h-full w-full pr-5">

View file

@ -15,7 +15,7 @@ export const SummarySideBar = ({
}: ISummarySideBarProps) => {
return (
<div
className={`h-full px-5 pt-5 transition-all duration-200 transform overflow-hidden ${
className={`h-full p-5 transition-all duration-200 transform overflow-hidden ${
sidePeekVisible ? "translate-x-0" : "-translate-x-full"
}`}
>

View file

@ -127,14 +127,14 @@ const DocumentEditor = ({
documentDetails={documentDetails}
/>
<div className="h-full w-full flex overflow-y-auto">
<div className="flex-shrink-0 h-full w-56 lg:w-80 sticky top-0">
<div className="flex-shrink-0 h-full w-56 lg:w-72 sticky top-0">
<SummarySideBar
editor={editor}
markings={markings}
sidePeekVisible={sidePeekVisible}
/>
</div>
<div className="h-full w-full">
<div className="h-full w-[calc(100%-14rem)] lg:w-[calc(100%-18rem-18rem)]">
<PageRenderer
editor={editor}
editorContentCustomClassNames={editorContentCustomClassNames}
@ -142,7 +142,7 @@ const DocumentEditor = ({
documentDetails={documentDetails}
/>
</div>
<div className="hidden lg:block flex-shrink-0 w-56 lg:w-80" />
<div className="hidden lg:block flex-shrink-0 w-56 lg:w-72" />
</div>
</div>
);