From 35e40a7bec4875cc0e4ccd50294e84061740d2b4 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Mon, 3 Apr 2023 18:14:50 +0530 Subject: [PATCH] chore: added placeholder to remirror (#686) * chore: added placeholder to remirror * fix: build error --- .../components/issues/comment/add-comment.tsx | 4 +-- apps/app/components/issues/form.tsx | 2 +- .../components/pages/single-page-block.tsx | 4 +-- .../app/components/rich-text-editor/index.tsx | 12 +++---- .../projects/[projectId]/pages/[pageId].tsx | 32 ++++++++++--------- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/apps/app/components/issues/comment/add-comment.tsx b/apps/app/components/issues/comment/add-comment.tsx index 426a222ac..307b4b0b4 100644 --- a/apps/app/components/issues/comment/add-comment.tsx +++ b/apps/app/components/issues/comment/add-comment.tsx @@ -96,7 +96,7 @@ export const AddComment: React.FC = () => { setValue("comment_json", jsonValue); setValue("comment_html", htmlValue); }} - // placeholder="Enter Your comment..." + placeholder="Enter your comment..." /> )} /> @@ -104,7 +104,7 @@ export const AddComment: React.FC = () => { diff --git a/apps/app/components/issues/form.tsx b/apps/app/components/issues/form.tsx index b320107ee..b37ba8db5 100644 --- a/apps/app/components/issues/form.tsx +++ b/apps/app/components/issues/form.tsx @@ -332,7 +332,7 @@ export const IssueForm: FC = ({ } onJSONChange={(jsonValue) => setValue("description", jsonValue)} onHTMLChange={(htmlValue) => setValue("description_html", htmlValue)} - placeholder="Description" + placeholder="Describe the issue..." /> )} /> diff --git a/apps/app/components/pages/single-page-block.tsx b/apps/app/components/pages/single-page-block.tsx index f138c39f8..6dd8b02bc 100644 --- a/apps/app/components/pages/single-page-block.tsx +++ b/apps/app/components/pages/single-page-block.tsx @@ -315,9 +315,9 @@ export const SinglePageBlock: React.FC = ({ block, projectDetails }) => { onJSONChange={(jsonValue) => setValue("description", jsonValue)} onHTMLChange={(htmlValue) => setValue("description_html", htmlValue)} placeholder="Block description..." - customClassName="border border-transparent" + customClassName="border border-transparent text-sm" noBorder - borderOnFocus + borderOnFocus={false} /> )} /> diff --git a/apps/app/components/rich-text-editor/index.tsx b/apps/app/components/rich-text-editor/index.tsx index 93ce1a60b..4c44650b9 100644 --- a/apps/app/components/rich-text-editor/index.tsx +++ b/apps/app/components/rich-text-editor/index.tsx @@ -185,25 +185,23 @@ const RemirrorRichTextEditor: FC = (props) => { }; return ( -
+
{ onBlur(jsonValue, htmlValue); }} > - {/* {(!value || value === "" || value?.content?.[0]?.content === undefined) && ( -

- {placeholder || "Enter text..."} -

- )} */} + {(!value || value === "" || value?.content?.[0]?.content === undefined) && placeholder && ( +

{placeholder}

+ )} {imageLoader && ( diff --git a/apps/app/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx b/apps/app/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx index fff14ef06..c12580afb 100644 --- a/apps/app/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx +++ b/apps/app/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx @@ -65,11 +65,11 @@ const SinglePage: NextPage = (props) => { workspaceSlug && projectId && pageId ? PAGE_DETAILS(pageId as string) : null, workspaceSlug && projectId ? () => - pagesService.getPageDetails( - workspaceSlug as string, - projectId as string, - pageId as string - ) + pagesService.getPageDetails( + workspaceSlug as string, + projectId as string, + pageId as string + ) : null ); @@ -77,11 +77,11 @@ const SinglePage: NextPage = (props) => { workspaceSlug && projectId && pageId ? PAGE_BLOCKS_LIST(pageId as string) : null, workspaceSlug && projectId ? () => - pagesService.listPageBlocks( - workspaceSlug as string, - projectId as string, - pageId as string - ) + pagesService.listPageBlocks( + workspaceSlug as string, + projectId as string, + pageId as string + ) : null ); @@ -272,8 +272,9 @@ const SinglePage: NextPage = (props) => { key={label.id} className="group flex items-center gap-1 rounded-2xl border px-2 py-0.5 text-xs" style={{ - backgroundColor: `${label?.color && label.color !== "" ? label.color : "#000000" - }20`, + backgroundColor: `${ + label?.color && label.color !== "" ? label.color : "#000000" + }20`, }} > = (props) => { <> {watch("color") && watch("color") !== "" ? ( = (props) => { )}