diff --git a/apps/app/components/issues/form.tsx b/apps/app/components/issues/form.tsx index 3a038b266..c2f179bc7 100644 --- a/apps/app/components/issues/form.tsx +++ b/apps/app/components/issues/form.tsx @@ -21,6 +21,7 @@ import { CreateUpdateCycleModal } from "components/cycles"; import { CreateLabelModal } from "components/labels"; // ui import { Button, CustomMenu, Input, Loader } from "components/ui"; +import { PrimaryButton } from "components/ui/button/primary-button"; // icons import { XMarkIcon } from "@heroicons/react/24/outline"; // helpers @@ -156,7 +157,7 @@ export const IssueForm: FC = ({ /> )} /> -

+

{status ? "Update" : "Create"} Issue

@@ -189,11 +190,11 @@ export const IssueForm: FC = ({
= ({ ? - {" "} +

- = ({ value={value} onJSONChange={(jsonValue) => setValue("description", jsonValue)} onHTMLChange={(htmlValue) => setValue("description_html", htmlValue)} - placeholder="Enter Your Text..." + placeholder="Description" /> )} /> @@ -333,7 +331,7 @@ export const IssueForm: FC = ({
-
+
setCreateMore((prevData) => !prevData)} @@ -360,15 +358,15 @@ export const IssueForm: FC = ({ - + ? "Adding Issue..." + : "Add Issue"} +
diff --git a/apps/app/components/issues/modal.tsx b/apps/app/components/issues/modal.tsx index 5a09a0578..c87ff2e66 100644 --- a/apps/app/components/issues/modal.tsx +++ b/apps/app/components/issues/modal.tsx @@ -231,7 +231,7 @@ export const CreateUpdateIssueModal: React.FC = ({
-
+
= ({ )}
-

{truncateText(project.description ?? "", 100)}

+

+ {truncateText(project.description ?? "", 100)} +

diff --git a/apps/app/components/rich-text-editor/index.tsx b/apps/app/components/rich-text-editor/index.tsx index 80c091e25..1413ed6cb 100644 --- a/apps/app/components/rich-text-editor/index.tsx +++ b/apps/app/components/rich-text-editor/index.tsx @@ -34,9 +34,8 @@ import fileService from "services/file.service"; // ui import { Spinner } from "components/ui"; // components -import { RichTextToolbar } from "./toolbar"; +import { CustomFloatingToolbar } from "./toolbar/float-tool-tip"; import { MentionAutoComplete } from "./mention-autocomplete"; -import { FloatingLinkToolbar } from "./toolbar/link"; export interface IRemirrorRichTextEditor { placeholder?: string; @@ -51,6 +50,9 @@ export interface IRemirrorRichTextEditor { customClassName?: string; } +// eslint-disable-next-line no-duplicate-imports +import { FloatingWrapper, FloatingToolbar } from "@remirror/react"; + const RemirrorRichTextEditor: FC = (props) => { const { placeholder, @@ -182,30 +184,42 @@ const RemirrorRichTextEditor: FC = (props) => { { onBlur(jsonValue, htmlValue); }} > -
- {showToolbar && editable && ( -
- -
- )} - - {imageLoader && ( -
- -
- )} - {/* */} - - - {} - {} -
+ {(!value || value === "" || value?.content?.[0]?.content === undefined) && ( +

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

+ )} + + + {imageLoader && ( +
+ +
+ )} + + {editable && ( + + + + + + )} + + + {} + {}
); diff --git a/apps/app/components/rich-text-editor/toolbar/float-tool-tip.tsx b/apps/app/components/rich-text-editor/toolbar/float-tool-tip.tsx new file mode 100644 index 000000000..d6cd4e794 --- /dev/null +++ b/apps/app/components/rich-text-editor/toolbar/float-tool-tip.tsx @@ -0,0 +1,33 @@ +// buttons +import { + ToggleBoldButton, + ToggleItalicButton, + ToggleUnderlineButton, + ToggleStrikeButton, + ToggleOrderedListButton, + ToggleBulletListButton, + ToggleCodeButton, +} from "@remirror/react"; + +import HeadingControls from "./heading-controls"; + +export const CustomFloatingToolbar: React.FC = () => ( +
+
+ +
+
+ + + + +
+
+ + +
+
+ +
+
+); diff --git a/apps/app/components/rich-text-editor/toolbar/link.tsx b/apps/app/components/rich-text-editor/toolbar/link.tsx index ffe246af3..458a50171 100644 --- a/apps/app/components/rich-text-editor/toolbar/link.tsx +++ b/apps/app/components/rich-text-editor/toolbar/link.tsx @@ -173,12 +173,12 @@ export const FloatingLinkToolbar = () => { return ( <> {!isEditing && ( - + {linkEditButtons} )} {!isEditing && empty && ( - + {linkEditButtons} )}