Skip to content

Commit

Permalink
fix: Render context menu components in the feed tree (FNNDSC#1160)
Browse files Browse the repository at this point in the history
  • Loading branch information
PintoGideon authored Apr 18, 2024
1 parent c6c994d commit 0d0952c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
18 changes: 17 additions & 1 deletion src/components/FeedTree/Node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useMutation } from "@tanstack/react-query";
import { notification } from "antd";
import { HierarchyPointNode } from "d3-hierarchy";
import { select } from "d3-selection";
import { Fragment, useContext, useEffect, useRef, memo } from "react";
import { Fragment, memo, useContext, useEffect, useRef } from "react";
import { useDispatch } from "react-redux";
import ChrisAPIClient from "../../api/chrisapiclient";
import { useTypedSelector } from "../../store/hooks";
Expand All @@ -13,7 +13,12 @@ import {
getSelectedPlugin,
} from "../../store/pluginInstance/actions";
import { getPluginInstanceStatusRequest } from "../../store/resources/actions";
import AddNodeConnect from "../AddNode/AddNode";
import { AddNodeProvider } from "../AddNode/context";
import AddPipeline from "../AddPipeline/AddPipeline";
import { ThemeContext } from "../DarkTheme/useTheme";
import DeleteNode from "../DeleteNode";
import { PipelineProvider } from "../PipelinesCopy/context";
import { FeedTreeScaleType } from "./Controls";
import DropdownMenu from "./DropdownMenu";
import TreeNodeDatum, { Datum, Point } from "./data";
Expand Down Expand Up @@ -245,6 +250,17 @@ const Node = (props: NodeProps) => {

return (
<Fragment>
<>
{/* Note this modals are fired from the dropdown menu in the tree*/}
<AddNodeProvider>
<AddNodeConnect />
</AddNodeProvider>
{/* Graph Node Container is missing */}
<DeleteNode />
<PipelineProvider>
<AddPipeline />
</PipelineProvider>
</>
{contextHolder}
{/* biome-ignore lint/a11y/useKeyWithClickEvents: <explanation> */}
<g
Expand Down
17 changes: 0 additions & 17 deletions src/components/NodeDetails/NodeDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,10 @@ import React, { Fragment, ReactNode } from "react";
import { ErrorBoundary } from "react-error-boundary";
import { useNavigate } from "react-router";
import { useTypedSelector } from "../../store/hooks";
import AddNodeConnect from "../AddNode/AddNode";
import { AddNodeProvider } from "../AddNode/context";
import AddPipeline from "../AddPipeline/AddPipeline";
import { SpinContainer } from "../Common";
import { isPlVisualDataset } from "../DatasetRedirect/getDatasets";
import DeleteNode from "../DeleteNode";
import FeedNote from "../FeedDetails/FeedNote";
import { CalendarAltIcon, PreviewIcon } from "../Icons";
import { PipelineProvider } from "../PipelinesCopy/context";
import "./NodeDetails.css";
import PluginLog from "./PluginLog";
import PluginTitle from "./PluginTitle";
Expand Down Expand Up @@ -219,18 +214,6 @@ const NodeDetails: React.FC = () => {
</Grid>
</ExpandableSection>

<>
{/* Note this modals are fired from the dropdown menu in the tree*/}
<AddNodeProvider>
<AddNodeConnect />
</AddNodeProvider>
{/* Graph Node Container is missing */}
<DeleteNode />
<PipelineProvider>
<AddPipeline />
</PipelineProvider>
</>

{
// Jennings: hastily adding an extra button here.
// IMO the Node Details pane should be cleaned up.
Expand Down

0 comments on commit 0d0952c

Please sign in to comment.