π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
[WIKI-539] regression: editor build errors #7503
Aaryan Khandelwale0b0aafc2b35
diff --git a/apps/space/helpers/editor.helper.ts b/apps/space/helpers/editor.helper.tsindex 1b114ea581..0315b9caf8 100644--- a/apps/space/helpers/editor.helper.ts+++ b/apps/space/helpers/editor.helper.ts@@ -1,6 +1,6 @@// plane importsimport { MAX_FILE_SIZE } from "@plane/constants";-import { TFileHandler, TReadOnlyFileHandler } from "@plane/editor";+import { TFileHandler } from "@plane/editor";import { SitesFileService } from "@plane/services";import { getFileURL } from "@plane/utils";// services@@ -22,10 +22,11 @@ type TArgs = {};/**- * @description this function returns the file handler required by the read-only editors+ * @description this function returns the file handler required by the editors+ * @param {TArgs} args*/-export const getReadOnlyEditorFileHandlers = (args: Pick<TArgs, "anchor" | "workspaceId">): TReadOnlyFileHandler => {- const { anchor, workspaceId } = args;+export const getEditorFileHandlers = (args: TArgs): TFileHandler => {+ const { anchor, uploadFile, workspaceId } = args;const getAssetSrc = async (path: string) => {if (!path) return "";@@ -38,31 +39,9 @@ export const getReadOnlyEditorFileHandlers = (args: Pick<TArgs, "anchor" | "workreturn {checkIfAssetExists: async () => true,+ assetsUploadStatus: {},getAssetDownloadSrc: getAssetSrc,getAssetSrc: getAssetSrc,- restore: async (src: string) => {- if (src?.startsWith("http")) {- await sitesFileService.restoreOldEditorAsset(workspaceId, src);- } else {- await sitesFileService.restoreNewAsset(anchor, src);- }- },- };-};--/**- * @description this function returns the file handler required by the editors- * @param {TArgs} args- */-export const getEditorFileHandlers = (args: TArgs): TFileHandler => {- const { anchor, uploadFile, workspaceId } = args;-- return {- ...getReadOnlyEditorFileHandlers({- anchor,- workspaceId,- }),- assetsUploadStatus: {},upload: uploadFile,delete: async (src: string) => {if (src?.startsWith("http")) {@@ -72,6 +51,13 @@ export const getEditorFileHandlers = (args: TArgs): TFileHandler => {}},cancel: sitesFileService.cancelUpload,+ restore: async (src: string) => {+ if (src?.startsWith("http")) {+ await sitesFileService.restoreOldEditorAsset(workspaceId, src);+ } else {+ await sitesFileService.restoreNewAsset(anchor, src);+ }+ },validation: {maxFileSize: MAX_FILE_SIZE,},diff --git a/apps/web/core/components/workspace-notifications/sidebar/notification-card/content.tsx b/apps/web/core/components/workspace-notifications/sidebar/notification-card/content.tsxindex b78776dd2d..d72ec28a05 100644--- a/apps/web/core/components/workspace-notifications/sidebar/notification-card/content.tsx+++ b/apps/web/core/components/workspace-notifications/sidebar/notification-card/content.tsx@@ -8,8 +8,7 @@ import {stripAndTruncateHTML,} from "@plane/utils";// components-// helpers-import { LiteTextReadOnlyEditor } from "@/components/editor";+import { LiteTextEditor } from "@/components/editor/lite-text";export const NotificationContent: FC<{notification: TNotification;@@ -100,7 +99,8 @@ export const NotificationContent: FC<{<span className="text-custom-text-100 font-medium">{renderValue()}</span>{notificationField === "comment" && renderCommentBox && (<div className="scale-75 origin-left">- <LiteTextReadOnlyEditor+ <LiteTextEditor+ editable={false}id=""initialValue={newValue ?? ""}workspaceId={workspaceId}