forked from github/plane
removed remirror instances and cleaned up code
This commit is contained in:
parent
579051db31
commit
96ef0a1e4f
@ -16,8 +16,6 @@ import { Icon } from "components/ui";
|
||||
import { renderShortDateWithYearFormat, timeAgo } from "helpers/date-time.helper";
|
||||
import { addSpaceIfCamelCase } from "helpers/string.helper";
|
||||
import Tiptap from "components/tiptap";
|
||||
// types
|
||||
// import RemirrorRichTextEditor from "components/rich-text-editor";
|
||||
|
||||
const activityDetails: {
|
||||
[key: string]: {
|
||||
@ -262,17 +260,6 @@ export const Feeds: React.FC<any> = ({ activities }) => {
|
||||
noBorder
|
||||
customClassName="text-xs border border-custom-border-200 bg-custom-background-100"
|
||||
/>
|
||||
{/**/}
|
||||
{/* <RemirrorRichTextEditor */}
|
||||
{/* value={ */}
|
||||
{/* activity.new_value && activity.new_value !== "" */}
|
||||
{/* ? activity.new_value */}
|
||||
{/* : activity.old_value */}
|
||||
{/* } */}
|
||||
{/* editable={false} */}
|
||||
{/* noBorder */}
|
||||
{/* customClassName="text-xs border border-custom-border-200 bg-custom-background-100" */}
|
||||
{/* /> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,7 +1,6 @@
|
||||
import React, { useEffect, useState, forwardRef, useRef } from "react";
|
||||
|
||||
import { useRouter } from "next/router";
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
// react-hook-form
|
||||
import { useForm } from "react-hook-form";
|
||||
@ -33,18 +32,6 @@ type FormData = {
|
||||
task: string;
|
||||
};
|
||||
|
||||
// const RemirrorRichTextEditor = dynamic(() => import("components/rich-text-editor"), {
|
||||
// ssr: false,
|
||||
// });
|
||||
//
|
||||
// import { IRemirrorRichTextEditor } from "components/rich-text-editor";
|
||||
//
|
||||
// const WrappedRemirrorRichTextEditor = forwardRef<IRemirrorRichTextEditor, IRemirrorRichTextEditor>(
|
||||
// (props, ref) => <RemirrorRichTextEditor {...props} forwardedRef={ref} />
|
||||
// );
|
||||
//
|
||||
// WrappedRemirrorRichTextEditor.displayName = "WrappedRemirrorRichTextEditor";
|
||||
|
||||
const TiptapEditor = React.forwardRef<
|
||||
ITiptapRichTextEditor,
|
||||
ITiptapRichTextEditor
|
||||
@ -52,7 +39,6 @@ const TiptapEditor = React.forwardRef<
|
||||
|
||||
TiptapEditor.displayName = "TiptapEditor";
|
||||
|
||||
|
||||
export const GptAssistantModal: React.FC<Props> = ({
|
||||
isOpen,
|
||||
handleClose,
|
||||
@ -169,14 +155,6 @@ export const GptAssistantModal: React.FC<Props> = ({
|
||||
editable={false}
|
||||
ref={editorRef}
|
||||
/>
|
||||
{/* <WrappedRemirrorRichTextEditor */}
|
||||
{/* value={htmlContent ?? <p>{content}</p>} */}
|
||||
{/* customClassName="-m-3" */}
|
||||
{/* noBorder */}
|
||||
{/* borderOnFocus={false} */}
|
||||
{/* editable={false} */}
|
||||
{/* ref={editorRef} */}
|
||||
{/* /> */}
|
||||
</div>
|
||||
)}
|
||||
{response !== "" && (
|
||||
@ -189,14 +167,6 @@ export const GptAssistantModal: React.FC<Props> = ({
|
||||
borderOnFocus={false}
|
||||
editable={false}
|
||||
/>
|
||||
|
||||
{/* <RemirrorRichTextEditor */}
|
||||
{/* value={`<p>${response}</p>`} */}
|
||||
{/* customClassName="-mx-3 -my-3" */}
|
||||
{/* noBorder */}
|
||||
{/* borderOnFocus={false} */}
|
||||
{/* editable={false} */}
|
||||
{/* /> */}
|
||||
</div>
|
||||
)}
|
||||
{invalidResponse && (
|
||||
|
@ -18,23 +18,6 @@ import type { ICurrentUserResponse, IIssueComment } from "types";
|
||||
import { PROJECT_ISSUES_ACTIVITY } from "constants/fetch-keys";
|
||||
import Tiptap, { ITiptapRichTextEditor } from "components/tiptap";
|
||||
|
||||
// const RemirrorRichTextEditor = dynamic(() => import("components/rich-text-editor"), {
|
||||
// ssr: false,
|
||||
// loading: () => (
|
||||
// <Loader className="mb-5">
|
||||
// <Loader.Item height="12rem" width="100%" />
|
||||
// </Loader>
|
||||
// ),
|
||||
// });
|
||||
// import { IRemirrorRichTextEditor } from "components/rich-text-editor";
|
||||
//
|
||||
// const WrappedRemirrorRichTextEditor = React.forwardRef<
|
||||
// IRemirrorRichTextEditor,
|
||||
// IRemirrorRichTextEditor
|
||||
// >((props, ref) => <RemirrorRichTextEditor {...props} forwardedRef={ref} />);
|
||||
//
|
||||
// WrappedRemirrorRichTextEditor.displayName = "WrappedRemirrorRichTextEditor";
|
||||
|
||||
const TiptapEditor = React.forwardRef<
|
||||
ITiptapRichTextEditor,
|
||||
ITiptapRichTextEditor
|
||||
|
@ -1,7 +1,5 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
// react-hook-form
|
||||
import { useForm } from "react-hook-form";
|
||||
// icons
|
||||
@ -17,17 +15,6 @@ import { timeAgo } from "helpers/date-time.helper";
|
||||
import type { IIssueComment } from "types";
|
||||
import Tiptap, { ITiptapRichTextEditor } from "components/tiptap";
|
||||
|
||||
// const RemirrorRichTextEditor = dynamic(() => import("components/rich-text-editor"), { ssr: false });
|
||||
//
|
||||
// import { IRemirrorRichTextEditor } from "components/rich-text-editor";
|
||||
//
|
||||
// const WrappedRemirrorRichTextEditor = React.forwardRef<
|
||||
// IRemirrorRichTextEditor,
|
||||
// IRemirrorRichTextEditor
|
||||
// >((props, ref) => <RemirrorRichTextEditor {...props} forwardedRef={ref} />);
|
||||
//
|
||||
// WrappedRemirrorRichTextEditor.displayName = "WrappedRemirrorRichTextEditor";
|
||||
|
||||
const TiptapEditor = React.forwardRef<
|
||||
ITiptapRichTextEditor,
|
||||
ITiptapRichTextEditor
|
||||
@ -115,15 +102,6 @@ export const CommentCard: React.FC<Props> = ({ comment, onSubmit, handleCommentD
|
||||
className={`flex-col gap-2 ${isEditing ? "flex" : "hidden"}`}
|
||||
onSubmit={handleSubmit(onEnter)}
|
||||
>
|
||||
{/* <WrappedRemirrorRichTextEditor */}
|
||||
{/* value={comment.comment_html} */}
|
||||
{/* onBlur={(jsonValue, htmlValue) => { */}
|
||||
{/* setValue("comment_json", jsonValue); */}
|
||||
{/* setValue("comment_html", htmlValue); */}
|
||||
{/* }} */}
|
||||
{/* placeholder="Enter Your comment..." */}
|
||||
{/* ref={editorRef} */}
|
||||
{/* /> */}
|
||||
<TiptapEditor
|
||||
ref={editorRef}
|
||||
value={watch("comment_html")}
|
||||
@ -158,13 +136,6 @@ export const CommentCard: React.FC<Props> = ({ comment, onSubmit, handleCommentD
|
||||
editable={false}
|
||||
customClassName="text-xs border border-custom-border-200 bg-custom-background-100"
|
||||
/>
|
||||
{/* <WrappedRemirrorRichTextEditor */}
|
||||
{/* value={comment.comment_html} */}
|
||||
{/* editable={false} */}
|
||||
{/* noBorder */}
|
||||
{/* customClassName="text-xs border border-custom-border-200 bg-custom-background-100" */}
|
||||
{/* ref={showEditorRef} */}
|
||||
{/* /> */}
|
||||
<CommentReaction projectId={comment.project} commentId={comment.id} />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,6 +1,5 @@
|
||||
import React, { FC, useState, useEffect, useRef } from "react";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
// react-hook-form
|
||||
@ -36,25 +35,8 @@ import {
|
||||
import { SparklesIcon, XMarkIcon } from "@heroicons/react/24/outline";
|
||||
// types
|
||||
import type { ICurrentUserResponse, IIssue, ISearchIssueResponse } from "types";
|
||||
import Tiptap from "components/tiptap";
|
||||
// rich-text-editor
|
||||
// const RemirrorRichTextEditor = dynamic(() => import("components/rich-text-editor"), {
|
||||
// ssr: false,
|
||||
// loading: () => (
|
||||
// <Loader className="mt-4">
|
||||
// <Loader.Item height="12rem" width="100%" />
|
||||
// </Loader>
|
||||
// ),
|
||||
// });
|
||||
|
||||
// import { IRemirrorRichTextEditor } from "components/rich-text-editor";
|
||||
|
||||
// const WrappedRemirrorRichTextEditor = React.forwardRef<
|
||||
// IRemirrorRichTextEditor,
|
||||
// IRemirrorRichTextEditor
|
||||
// >((props, ref) => <RemirrorRichTextEditor {...props} forwardedRef={ref} />);
|
||||
//
|
||||
// WrappedRemirrorRichTextEditor.displayName = "WrappedRemirrorRichTextEditor";
|
||||
import Tiptap from "components/tiptap";
|
||||
|
||||
const defaultValues: Partial<IIssue> = {
|
||||
project: "",
|
||||
|
@ -1,7 +1,6 @@
|
||||
import React, { useCallback, useEffect, useState } from "react";
|
||||
|
||||
import { useRouter } from "next/router";
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
import { mutate } from "swr";
|
||||
|
||||
@ -18,7 +17,7 @@ import useToast from "hooks/use-toast";
|
||||
// components
|
||||
import { GptAssistantModal } from "components/core";
|
||||
// ui
|
||||
import { Loader, PrimaryButton, SecondaryButton, TextArea } from "components/ui";
|
||||
import { PrimaryButton, SecondaryButton, TextArea } from "components/ui";
|
||||
// types
|
||||
import { ICurrentUserResponse, IPageBlock } from "types";
|
||||
// fetch-keys
|
||||
@ -40,23 +39,6 @@ const defaultValues = {
|
||||
description_html: null,
|
||||
};
|
||||
|
||||
// const RemirrorRichTextEditor = dynamic(() => import("components/rich-text-editor"), {
|
||||
// ssr: false,
|
||||
// loading: () => (
|
||||
// <Loader className="mx-4 mt-6">
|
||||
// <Loader.Item height="100px" width="100%" />
|
||||
// </Loader>
|
||||
// ),
|
||||
// });
|
||||
// import { IRemirrorRichTextEditor } from "components/rich-text-editor";
|
||||
//
|
||||
// const WrappedRemirrorRichTextEditor = React.forwardRef<
|
||||
// IRemirrorRichTextEditor,
|
||||
// IRemirrorRichTextEditor
|
||||
// >((props, ref) => <RemirrorRichTextEditor {...props} forwardedRef={ref} />);
|
||||
//
|
||||
// WrappedRemirrorRichTextEditor.displayName = "WrappedRemirrorRichTextEditor";
|
||||
|
||||
const TiptapEditor = React.forwardRef<
|
||||
ITiptapRichTextEditor,
|
||||
ITiptapRichTextEditor
|
||||
@ -322,19 +304,6 @@ export const CreateUpdateBlockInline: React.FC<Props> = ({
|
||||
setValue("description", description);
|
||||
}}
|
||||
/>
|
||||
// <WrappedRemirrorRichTextEditor
|
||||
// value={{
|
||||
// type: "doc",
|
||||
// content: [{ type: "paragraph" }],
|
||||
// }}
|
||||
// onJSONChange={(jsonValue) => setValue("description", jsonValue)}
|
||||
// onHTMLChange={(htmlValue) => setValue("description_html", htmlValue)}
|
||||
// placeholder="Write something..."
|
||||
// customClassName="text-sm"
|
||||
// noBorder
|
||||
// borderOnFocus={false}
|
||||
// ref={editorRef}
|
||||
// />
|
||||
);
|
||||
else if (!value || !watch("description_html"))
|
||||
return (
|
||||
@ -360,22 +329,6 @@ export const CreateUpdateBlockInline: React.FC<Props> = ({
|
||||
setValue("description", description);
|
||||
}}
|
||||
/>
|
||||
// <WrappedRemirrorRichTextEditor
|
||||
// value={
|
||||
// value && value !== "" && Object.keys(value).length > 0
|
||||
// ? value
|
||||
// : watch("description_html") && watch("description_html") !== ""
|
||||
// ? watch("description_html")
|
||||
// : { type: "doc", content: [{ type: "paragraph" }] }
|
||||
// }
|
||||
// onJSONChange={(jsonValue) => setValue("description", jsonValue)}
|
||||
// onHTMLChange={(htmlValue) => setValue("description_html", htmlValue)}
|
||||
// placeholder="Write something..."
|
||||
// customClassName="text-sm"
|
||||
// noBorder
|
||||
// borderOnFocus={false}
|
||||
// ref={editorRef}
|
||||
// />
|
||||
);
|
||||
}}
|
||||
/>
|
||||
|
@ -1,7 +1,5 @@
|
||||
import { useEffect } from "react";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
// react-hook-form
|
||||
import { useForm } from "react-hook-form";
|
||||
// ui
|
||||
@ -16,16 +14,6 @@ type Props = {
|
||||
data?: IPage | null;
|
||||
};
|
||||
|
||||
// rich-text-editor
|
||||
// const RemirrorRichTextEditor = dynamic(() => import("components/rich-text-editor"), {
|
||||
// ssr: false,
|
||||
// loading: () => (
|
||||
// <Loader>
|
||||
// <Loader.Item height="12rem" width="100%" />
|
||||
// </Loader>
|
||||
// ),
|
||||
// });
|
||||
|
||||
const defaultValues = {
|
||||
name: "",
|
||||
description: "",
|
||||
|
@ -19,7 +19,6 @@ import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||
// components
|
||||
import { GptAssistantModal } from "components/core";
|
||||
import { CreateUpdateBlockInline } from "components/pages";
|
||||
// import RemirrorRichTextEditor, { IRemirrorRichTextEditor } from "components/rich-text-editor";
|
||||
// ui
|
||||
import { CustomMenu, TextArea } from "components/ui";
|
||||
// icons
|
||||
@ -49,12 +48,6 @@ type Props = {
|
||||
user: ICurrentUserResponse | undefined;
|
||||
};
|
||||
|
||||
// const WrappedRemirrorRichTextEditor = React.forwardRef<
|
||||
// IRemirrorRichTextEditor,
|
||||
// IRemirrorRichTextEditor
|
||||
// >((props, ref) => <RemirrorRichTextEditor {...props} forwardedRef={ref} />);
|
||||
|
||||
// WrappedRemirrorRichTextEditor.displayName = "WrappedRemirrorRichTextEditor";
|
||||
const TiptapEditor = React.forwardRef<
|
||||
ITiptapRichTextEditor,
|
||||
ITiptapRichTextEditor
|
||||
|
Loading…
Reference in New Issue
Block a user