From 551df1e0e876b1bbdd949ee1825fe956569676a8 Mon Sep 17 00:00:00 2001 From: Atul Tameshwari Date: Wed, 17 Jun 2026 10:54:07 +0530 Subject: [PATCH] refactor: remove legacy gantt-chart components and introduce new core components for gantt-chart functionality --- apps/web/ce/components/gantt-chart/index.ts | 8 -------- .../gantt-chart/blocks/block-row-list.tsx | 0 .../components/gantt-chart/blocks/blocks-list.tsx | 0 .../components/gantt-chart/chart/main-content.tsx | 13 +++++-------- .../gantt-chart/dependency/blockDraggables/index.ts | 0 .../dependency/blockDraggables/left-draggable.tsx | 0 .../dependency/blockDraggables/right-draggable.tsx | 0 .../gantt-chart/dependency/dependency-paths.tsx | 0 .../dependency/draggable-dependency-path.tsx | 0 .../components/gantt-chart/dependency/index.ts | 0 .../components/gantt-chart/helpers/draggable.tsx | 6 +++--- .../gantt-chart/layers/additional-layers.tsx | 0 .../components/gantt-chart/layers/index.ts | 0 13 files changed, 8 insertions(+), 19 deletions(-) delete mode 100644 apps/web/ce/components/gantt-chart/index.ts rename apps/web/{ce => core}/components/gantt-chart/blocks/block-row-list.tsx (100%) rename apps/web/{ce => core}/components/gantt-chart/blocks/blocks-list.tsx (100%) rename apps/web/{ce => core}/components/gantt-chart/dependency/blockDraggables/index.ts (100%) rename apps/web/{ce => core}/components/gantt-chart/dependency/blockDraggables/left-draggable.tsx (100%) rename apps/web/{ce => core}/components/gantt-chart/dependency/blockDraggables/right-draggable.tsx (100%) rename apps/web/{ce => core}/components/gantt-chart/dependency/dependency-paths.tsx (100%) rename apps/web/{ce => core}/components/gantt-chart/dependency/draggable-dependency-path.tsx (100%) rename apps/web/{ce => core}/components/gantt-chart/dependency/index.ts (100%) rename apps/web/{ce => core}/components/gantt-chart/layers/additional-layers.tsx (100%) rename apps/web/{ce => core}/components/gantt-chart/layers/index.ts (100%) diff --git a/apps/web/ce/components/gantt-chart/index.ts b/apps/web/ce/components/gantt-chart/index.ts deleted file mode 100644 index cebec203cb..0000000000 --- a/apps/web/ce/components/gantt-chart/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -export * from "./dependency"; -export * from "./layers"; diff --git a/apps/web/ce/components/gantt-chart/blocks/block-row-list.tsx b/apps/web/core/components/gantt-chart/blocks/block-row-list.tsx similarity index 100% rename from apps/web/ce/components/gantt-chart/blocks/block-row-list.tsx rename to apps/web/core/components/gantt-chart/blocks/block-row-list.tsx diff --git a/apps/web/ce/components/gantt-chart/blocks/blocks-list.tsx b/apps/web/core/components/gantt-chart/blocks/blocks-list.tsx similarity index 100% rename from apps/web/ce/components/gantt-chart/blocks/blocks-list.tsx rename to apps/web/core/components/gantt-chart/blocks/blocks-list.tsx diff --git a/apps/web/core/components/gantt-chart/chart/main-content.tsx b/apps/web/core/components/gantt-chart/chart/main-content.tsx index 16f1109dfa..308329fc7c 100644 --- a/apps/web/core/components/gantt-chart/chart/main-content.tsx +++ b/apps/web/core/components/gantt-chart/chart/main-content.tsx @@ -22,20 +22,16 @@ import { GanttChartSidebar, MonthChartView, QuarterChartView, WeekChartView } fr // helpers // hooks import { useTimeLineChartStore } from "@/hooks/use-timeline-chart"; -// plane web components -import { - TimelineDependencyPaths, - TimelineDraggablePath, - GanttAdditionalLayers, -} from "@/plane-web/components/gantt-chart"; -import { GanttChartRowList } from "@/plane-web/components/gantt-chart/blocks/block-row-list"; -import { GanttChartBlocksList } from "@/plane-web/components/gantt-chart/blocks/blocks-list"; +import { GanttChartRowList } from "@/components/gantt-chart/blocks/block-row-list"; +import { GanttChartBlocksList } from "@/components/gantt-chart/blocks/blocks-list"; import { IssueBulkOperationsRoot } from "@/plane-web/components/issues/bulk-operations"; import { useBulkOperationStatus } from "@/hooks/use-bulk-operation-status"; // local imports import { DEFAULT_BLOCK_WIDTH, GANTT_SELECT_GROUP, HEADER_HEIGHT } from "../constants"; import { getItemPositionWidth } from "../views"; import { TimelineDragHelper } from "./timeline-drag-helper"; +import { TimelineDependencyPaths, TimelineDraggablePath } from "../dependency"; +import { GanttAdditionalLayers } from "../layers"; type Props = { blockIds: string[]; @@ -109,6 +105,7 @@ export const GanttChartMainContent = observer(function GanttChartMainContent(pro canScroll: ({ source }) => source.data.dragInstanceId === "GANTT_REORDER", }) ); + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, [ganttContainerRef?.current]); // handling scroll functionality diff --git a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/index.ts b/apps/web/core/components/gantt-chart/dependency/blockDraggables/index.ts similarity index 100% rename from apps/web/ce/components/gantt-chart/dependency/blockDraggables/index.ts rename to apps/web/core/components/gantt-chart/dependency/blockDraggables/index.ts diff --git a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/left-draggable.tsx b/apps/web/core/components/gantt-chart/dependency/blockDraggables/left-draggable.tsx similarity index 100% rename from apps/web/ce/components/gantt-chart/dependency/blockDraggables/left-draggable.tsx rename to apps/web/core/components/gantt-chart/dependency/blockDraggables/left-draggable.tsx diff --git a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/right-draggable.tsx b/apps/web/core/components/gantt-chart/dependency/blockDraggables/right-draggable.tsx similarity index 100% rename from apps/web/ce/components/gantt-chart/dependency/blockDraggables/right-draggable.tsx rename to apps/web/core/components/gantt-chart/dependency/blockDraggables/right-draggable.tsx diff --git a/apps/web/ce/components/gantt-chart/dependency/dependency-paths.tsx b/apps/web/core/components/gantt-chart/dependency/dependency-paths.tsx similarity index 100% rename from apps/web/ce/components/gantt-chart/dependency/dependency-paths.tsx rename to apps/web/core/components/gantt-chart/dependency/dependency-paths.tsx diff --git a/apps/web/ce/components/gantt-chart/dependency/draggable-dependency-path.tsx b/apps/web/core/components/gantt-chart/dependency/draggable-dependency-path.tsx similarity index 100% rename from apps/web/ce/components/gantt-chart/dependency/draggable-dependency-path.tsx rename to apps/web/core/components/gantt-chart/dependency/draggable-dependency-path.tsx diff --git a/apps/web/ce/components/gantt-chart/dependency/index.ts b/apps/web/core/components/gantt-chart/dependency/index.ts similarity index 100% rename from apps/web/ce/components/gantt-chart/dependency/index.ts rename to apps/web/core/components/gantt-chart/dependency/index.ts diff --git a/apps/web/core/components/gantt-chart/helpers/draggable.tsx b/apps/web/core/components/gantt-chart/helpers/draggable.tsx index 9552c9b6dc..5543791155 100644 --- a/apps/web/core/components/gantt-chart/helpers/draggable.tsx +++ b/apps/web/core/components/gantt-chart/helpers/draggable.tsx @@ -11,11 +11,10 @@ import { observer } from "mobx-react"; import type { IGanttBlock } from "@plane/types"; // helpers import { cn } from "@plane/utils"; -// Plane-web -import { LeftDependencyDraggable, RightDependencyDraggable } from "@/plane-web/components/gantt-chart"; -// +// components import { LeftResizable } from "./blockResizables/left-resizable"; import { RightResizable } from "./blockResizables/right-resizable"; +import { RightDependencyDraggable, LeftDependencyDraggable } from "../dependency"; type Props = { block: IGanttBlock; @@ -54,6 +53,7 @@ export const ChartDraggable = observer(function ChartDraggable(props: Props) { isMoving={isMoving} position={block.position} /> + {/* oxlint-disable-next-line jsx_a11y/no-static-element-interactions */}