Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

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

Aaryan Khandelwal3a86fff7c1de
diff --git a/web/core/components/editor/sticky-editor/color-palette.tsx b/web/core/components/editor/sticky-editor/color-palette.tsx
index f6586121af..a4fe05b777 100644
--- a/web/core/components/editor/sticky-editor/color-palette.tsx
+++ b/web/core/components/editor/sticky-editor/color-palette.tsx
@@ -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",
diff --git a/web/core/components/editor/sticky-editor/editor.tsx b/web/core/components/editor/sticky-editor/editor.tsx
index 376a317c8c..d31090b516 100644
--- a/web/core/components/editor/sticky-editor/editor.tsx
+++ b/web/core/components/editor/sticky-editor/editor.tsx
@@ -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}
/>
diff --git a/web/core/components/stickies/sticky/inputs.tsx b/web/core/components/stickies/sticky/inputs.tsx
index e56f6927e0..b3a81cd6cc 100644
--- a/web/core/components/stickies/sticky/inputs.tsx
+++ b/web/core/components/stickies/sticky/inputs.tsx
@@ -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}