mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 22:09:12 +02:00
refactor: remove legacy gantt-chart components and introduce new core components for gantt-chart functionality
This commit is contained in:
@@ -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";
|
||||
@@ -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
|
||||
|
||||
@@ -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 */}
|
||||
<div
|
||||
className={cn("relative z-[6] flex h-8 w-full items-center rounded-sm", {
|
||||
"pointer-events-none": isMoving,
|
||||
|
||||
Reference in New Issue
Block a user