Skip to content

Commit

Permalink
Fixes links in hamilton from node -> downstream node
Browse files Browse the repository at this point in the history
It is hard to see how this ever worked, but it's likely that the old
Menu.Item and the new MenuItem changed behavior to disable clicks on
their contents when disabled was applied. Thus this didn't work. Now it
does.
  • Loading branch information
elijahbenizzy committed Jul 20, 2024
1 parent ec7f0bd commit 4e0fec8
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions ui/frontend/src/components/dashboard/Runs/Task/Task.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ErrorView } from "./ErrorView";
import { CodeSummaryView } from "./CodeView";
import { BiChevronLeft } from "react-icons/bi";
import { Fragment } from "react";
import { Menu, Transition } from "@headlessui/react";
import { Menu, MenuItem, MenuItems, Transition } from "@headlessui/react";
import { ChevronDownIcon } from "@heroicons/react/20/solid";
import ReactSelect from "react-select";
import {
Expand All @@ -16,9 +16,7 @@ import {
getNodeOutputType,
} from "../../../../state/api/friendlyApi";
import { NodeMetadataPythonType1 } from "../../../../state/api/backendApiRaw";
import {
MultiResultSummaryView,
} from "./result-summaries/DataObservability";
import { MultiResultSummaryView } from "./result-summaries/DataObservability";
import { RunLink } from "../../../common/CommonLinks";
import { extractCodeContents } from "../../../../utils/codeExtraction";

Expand Down Expand Up @@ -208,7 +206,7 @@ export const NodeLinkMenu = (props: {
leaveFrom="transform opacity-100 scale-100"
leaveTo="transform opacity-0 scale-95"
>
<Menu.Items
<MenuItems
className="absolute right-0 z-10 mt-2
origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none w-max"
>
Expand All @@ -222,7 +220,7 @@ export const NodeLinkMenu = (props: {
const Icon = getPythonTypeIcon(pythonType);
const multipleRuns = nodeLink.runIds.length > 1;
return (
<Menu.Item key={i} disabled>
<MenuItem key={i} disabled={disabled}>
{() => (
<Link
to={
Expand Down Expand Up @@ -263,11 +261,11 @@ export const NodeLinkMenu = (props: {
</div>
</Link>
)}
</Menu.Item>
</MenuItem>
);
})}
</div>
</Menu.Items>
</MenuItems>
</Transition>
</Menu>
);
Expand Down

0 comments on commit 4e0fec8

Please sign in to comment.