diff --git a/web/core/components/editor/sticky-editor/editor.tsx b/web/core/components/editor/sticky-editor/editor.tsx index cd2ae8cad6d..d63616536d2 100644 --- a/web/core/components/editor/sticky-editor/editor.tsx +++ b/web/core/components/editor/sticky-editor/editor.tsx @@ -3,12 +3,11 @@ import React, { useState } from "react"; import { EIssueCommentAccessSpecifier } from "@plane/constants"; // plane editor import { EditorRefApi, ILiteTextEditor, LiteTextEditorWithRef } from "@plane/editor"; -// components +// plane types import { TSticky } from "@plane/types"; // helpers import { cn } from "@/helpers/common.helper"; import { getEditorFileHandlers } from "@/helpers/editor.helper"; -// hooks // plane web hooks import { useEditorFlagging } from "@/plane-web/hooks/use-editor-flagging"; import { useFileSize } from "@/plane-web/hooks/use-file-size"; @@ -60,7 +59,7 @@ export const StickyEditor = React.forwardRef !showToolbarInitially && setIsFocused(true)} onBlur={() => !showToolbarInitially && setIsFocused(false)} > @@ -82,10 +81,10 @@ export const StickyEditor = React.forwardRef {showToolbar && (
{ diff --git a/web/core/components/editor/sticky-editor/toolbar.tsx b/web/core/components/editor/sticky-editor/toolbar.tsx index 35dbb9ada08..c92f7448d60 100644 --- a/web/core/components/editor/sticky-editor/toolbar.tsx +++ b/web/core/components/editor/sticky-editor/toolbar.tsx @@ -58,7 +58,7 @@ export const StickyEditorToolbar: React.FC = (props) => { useOutsideClickDetector(colorPaletteRef, () => setShowColorPalette(false)); return ( -
+
{/* color palette */} {showColorPalette && } diff --git a/web/core/components/stickies/layout/sticky-dnd-wrapper.tsx b/web/core/components/stickies/layout/sticky-dnd-wrapper.tsx index eda39e24ff1..203b3d154dd 100644 --- a/web/core/components/stickies/layout/sticky-dnd-wrapper.tsx +++ b/web/core/components/stickies/layout/sticky-dnd-wrapper.tsx @@ -121,15 +121,20 @@ export const StickyDNDWrapper = observer((props: Props) => { }, [handleDrop, isDragging, isLastChild, pathname, stickyId, workspaceSlug]); return ( -
- {!isInFirstRow && } +
+ {/* {!isInFirstRow && } */} - {!isInLastRow && } + {/* {!isInLastRow && } */}
); }); diff --git a/web/core/components/stickies/sticky/inputs.tsx b/web/core/components/stickies/sticky/inputs.tsx index 0aef502a107..ed03fe18551 100644 --- a/web/core/components/stickies/sticky/inputs.tsx +++ b/web/core/components/stickies/sticky/inputs.tsx @@ -1,11 +1,12 @@ import { useCallback, useEffect, useRef } from "react"; +import { usePathname } from "next/navigation"; import { Controller, useForm } from "react-hook-form"; // plane editor import { EditorRefApi } from "@plane/editor"; // plane types import { TSticky } from "@plane/types"; // plane utils -import { isCommentEmpty } from "@plane/utils"; +import { cn, isCommentEmpty } from "@plane/utils"; // hooks import { useWorkspace } from "@/hooks/store"; // components @@ -25,10 +26,13 @@ export const StickyInput = (props: TProps) => { const { stickyData, workspaceSlug, handleUpdate, stickyId, handleDelete, handleChange, showToolbar } = props; // refs const editorRef = useRef(null); + // navigation + const pathname = usePathname(); // store hooks const { getWorkspaceBySlug } = useWorkspace(); // derived values const workspaceId = getWorkspaceBySlug(workspaceSlug)?.id?.toString() ?? ""; + const isStickiesPage = pathname?.includes("stickies"); // form info const { handleSubmit, reset, control } = useForm({ defaultValues: { @@ -74,10 +78,15 @@ export const StickyInput = (props: TProps) => { if (!isContentEmpty) return ""; return "Click to type here"; }} - containerClassName="px-0 text-base min-h-[250px] w-full" + containerClassName={cn( + "w-full min-h-[256px] max-h-[540px] overflow-y-scroll vertical-scrollbar scrollbar-sm p-4 text-base", + { + "max-h-[588px]": isStickiesPage, + } + )} uploadFile={async () => ""} showToolbar={showToolbar} - parentClassName={"border-none p-0"} + parentClassName="border-none p-0" handleDelete={handleDelete} handleColorChange={handleChange} ref={editorRef} diff --git a/web/core/components/stickies/sticky/root.tsx b/web/core/components/stickies/sticky/root.tsx index 50605184b40..7a0957a2b09 100644 --- a/web/core/components/stickies/sticky/root.tsx +++ b/web/core/components/stickies/sticky/root.tsx @@ -74,7 +74,7 @@ export const StickyNote = observer((props: TProps) => { handleClose={() => setIsDeleteModalOpen(false)} />