From aae4d34eb0b1bc8dcee0fdddaf7c0d2149e97323 Mon Sep 17 00:00:00 2001 From: Palanikannan1437 <73993394+Palanikannan1437@users.noreply.github.com> Date: Mon, 1 Apr 2024 12:11:04 +0530 Subject: [PATCH] chore: remove debug statements --- packages/editor/core/src/lib/editor-commands.ts | 2 -- .../custom-list-keymap/list-helpers/get-prev-list-depth.ts | 1 - .../custom-list-keymap/list-helpers/list-item-has-sub-list.ts | 3 --- .../custom-list-keymap/list-helpers/next-list-is-sibling.ts | 2 -- .../custom-list-keymap/list-helpers/prev-list-is-higher.ts | 1 - packages/editor/extensions/src/extensions/drag-drop.tsx | 3 --- web/components/inbox/modals/create-issue-modal.tsx | 2 -- web/store/mention.store.ts | 2 -- 8 files changed, 16 deletions(-) diff --git a/packages/editor/core/src/lib/editor-commands.ts b/packages/editor/core/src/lib/editor-commands.ts index 96d289359c..c04dfd57ed 100644 --- a/packages/editor/core/src/lib/editor-commands.ts +++ b/packages/editor/core/src/lib/editor-commands.ts @@ -125,8 +125,6 @@ export const insertImageCommand = ( if (input.files?.length) { const file = input.files[0]; const pos = savedSelection?.anchor ?? editor.view.state.selection.from; - // __AUTO_GENERATED_PRINT_VAR_START__ - console.log("insertImageCommand#(anon)#if pos: %s", pos); // __AUTO_GENERATED_PRINT_VAR_END__ startImageUpload(file, editor.view, pos, uploadFile, setIsSubmitting); } }; diff --git a/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/get-prev-list-depth.ts b/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/get-prev-list-depth.ts index 5bb121f6ab..47291decb5 100644 --- a/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/get-prev-list-depth.ts +++ b/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/get-prev-list-depth.ts @@ -31,6 +31,5 @@ export const getPrevListDepth = (typeOrName: string, state: EditorState) => { // Double the depth value to get results as 2, 4, 6, 8, etc. depth = depth * 2; - console.log("Parent list depth", depth); return depth; }; diff --git a/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/list-item-has-sub-list.ts b/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/list-item-has-sub-list.ts index c9de6c5492..5c15a2b63d 100644 --- a/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/list-item-has-sub-list.ts +++ b/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/list-item-has-sub-list.ts @@ -10,15 +10,12 @@ export const listItemHasSubList = (typeOrName: string, state: EditorState, node? const nodeType = getNodeType(typeOrName, state.schema); let hasSubList = false; - console.log("node", node); node.descendants((child) => { if (child.type === nodeType) { - console.log("child", child.type, nodeType); hasSubList = true; } }); - console.log("before return", hasSubList); return hasSubList; }; diff --git a/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/next-list-is-sibling.ts b/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/next-list-is-sibling.ts index a4030cc0d1..4695490b04 100644 --- a/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/next-list-is-sibling.ts +++ b/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/next-list-is-sibling.ts @@ -11,8 +11,6 @@ export const nextListIsSibling = (typeOrName: string, state: EditorState) => { return false; } - console.log("sibling", listDepth, "current", listItemPos.depth, listItemPos, listDepth < listItemPos.depth); - if (listDepth === listItemPos.depth) { return true; } diff --git a/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/prev-list-is-higher.ts b/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/prev-list-is-higher.ts index 51d790d203..09a3bfc533 100644 --- a/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/prev-list-is-higher.ts +++ b/packages/editor/core/src/ui/extensions/custom-list-keymap/list-helpers/prev-list-is-higher.ts @@ -11,7 +11,6 @@ export const prevListIsHigher = (typeOrName: string, state: EditorState) => { return false; } - console.log(listDepth, listItemPos.depth, listItemPos, listDepth < listItemPos.depth); if (listDepth < listItemPos.depth) { return true; } diff --git a/packages/editor/extensions/src/extensions/drag-drop.tsx b/packages/editor/extensions/src/extensions/drag-drop.tsx index 40b0b712c2..2a494da321 100644 --- a/packages/editor/extensions/src/extensions/drag-drop.tsx +++ b/packages/editor/extensions/src/extensions/drag-drop.tsx @@ -113,12 +113,9 @@ function DragHandle(options: DragHandleOptions) { y: event.clientY, }); - console.log(node); // Log the node to see if it's correctly identified - if (!(node instanceof Element)) return; const nodePos = nodePosAtDOM(node, view, options); - console.log(nodePos); // Log the node position to see if it's correctly calculated if (nodePos === null || nodePos === undefined) return; diff --git a/web/components/inbox/modals/create-issue-modal.tsx b/web/components/inbox/modals/create-issue-modal.tsx index 4455bf4afa..71328391c2 100644 --- a/web/components/inbox/modals/create-issue-modal.tsx +++ b/web/components/inbox/modals/create-issue-modal.tsx @@ -57,8 +57,6 @@ export const CreateInboxIssueModal: React.FC = observer((props) => { const workspaceStore = useWorkspace(); const workspaceId = workspaceStore.getWorkspaceBySlug(workspaceSlug as string)?.id as string; - console.log("in create issue modal", workspaceSlug, projectId); - const { mentionHighlights, mentionSuggestions } = useMention({ workspaceSlug: workspaceSlug as string, projectId: projectId as string, diff --git a/web/store/mention.store.ts b/web/store/mention.store.ts index 12f672ab86..c72d0d45dc 100644 --- a/web/store/mention.store.ts +++ b/web/store/mention.store.ts @@ -33,8 +33,6 @@ export class MentionStore implements IMentionStore { const suggestions = (projectMemberIds ?? [])?.map((memberId) => { const memberDetails = this.rootStore.memberRoot.project.getProjectMemberDetails(memberId); - // __AUTO_GENERATED_PRINT_VAR_START__ - console.log("MentionStore#mentionSuggestions#(anon) memberDetails are: %s", memberDetails?.member.id); // __AUTO_GENERATED_PRINT_VAR_END__ return { entity_name: "user_mention",