[WEB-3045] fix: sticky placeholder, gray color value (#6436)

* fix: sticky placeholder

* chore: update gray color
This commit is contained in:
Aaryan Khandelwal 2025-01-21 20:32:45 +05:30 committed by GitHub
parent 58a4b45463
commit 3a86fff7c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 4 deletions

View file

@ -8,7 +8,7 @@ export const STICKY_COLORS_LIST: {
{
key: "gray",
label: "Gray",
backgroundColor: "var(--editor-colors-gray-background)",
backgroundColor: "rgba(var(--color-background-90))",
},
{
key: "peach",

View file

@ -43,7 +43,6 @@ export const StickyEditor = React.forwardRef<EditorRefApi, StickyEditorWrapperPr
showToolbarInitially = true,
showToolbar = true,
parentClassName = "",
placeholder = "Add comment...",
uploadFile,
...rest
} = props;
@ -78,7 +77,6 @@ export const StickyEditor = React.forwardRef<EditorRefApi, StickyEditorWrapperPr
mentionHandler={{
renderComponent: () => <></>,
}}
placeholder={placeholder}
containerClassName={cn(containerClassName, "relative")}
{...rest}
/>

View file

@ -4,6 +4,8 @@ import { Controller, useForm } from "react-hook-form";
import { EditorRefApi } from "@plane/editor";
// plane types
import { TSticky } from "@plane/types";
// plane utils
import { isCommentEmpty } from "@plane/utils";
// hooks
import { useWorkspace } from "@/hooks/store";
// components
@ -67,7 +69,11 @@ export const StickyInput = (props: TProps) => {
onChange(description_html);
handleSubmit(handleFormSubmit)();
}}
placeholder="Click to type here"
placeholder={(_, value) => {
const isContentEmpty = isCommentEmpty(value);
if (!isContentEmpty) return "";
return "Click to type here";
}}
containerClassName="px-0 text-base min-h-[250px] w-full"
uploadFile={async () => ""}
showToolbar={showToolbar}