diff --git a/ui/src/Tooltip.test.tsx b/ui/src/Tooltip.test.tsx index 3b61fcbc78..aa3c9c1bac 100644 --- a/ui/src/Tooltip.test.tsx +++ b/ui/src/Tooltip.test.tsx @@ -29,12 +29,11 @@ function getTestNode(): Entry { }; } -it("tooltip should render correctly when visible", () => { +it("tooltip should render", () => { const { getByText } = render( , ); @@ -42,25 +41,11 @@ it("tooltip should render correctly when visible", () => { expect(getByText("test content")).toBeInTheDocument(); }); -it("tooltip should not render when not visible", () => { - const r = render( - , - ); - // should have a tooltip-hidden class - expect(r.container.querySelector(".tooltip-hidden")).not.toBeNull(); -}); - it("tooltip should respond to position", () => { const r = render( , ); diff --git a/ui/src/Tooltip.tsx b/ui/src/Tooltip.tsx index c52d6c42d3..aeaea97ad8 100644 --- a/ui/src/Tooltip.tsx +++ b/ui/src/Tooltip.tsx @@ -6,7 +6,6 @@ const Tooltip_marginY = 30; export interface TooltipProps { node?: Entry; - visible: boolean; x: number; y: number; } @@ -16,7 +15,6 @@ export const Tooltip: React.FC x, y, node, - visible, }) => { const ref = useRef(null); const [style, setStyle] = useState({}); @@ -56,7 +54,7 @@ export const Tooltip: React.FC }, [x, y]); return ( -
+
{path}
             {content}
diff --git a/ui/src/TreeMap.tsx b/ui/src/TreeMap.tsx
index 9adba32f4b..af10044498 100644
--- a/ui/src/TreeMap.tsx
+++ b/ui/src/TreeMap.tsx
@@ -239,7 +239,7 @@ function TreeMap({ entry }: TreeMapProps) {
 
   return (
     <>
-      
+      {showTooltip && }
       
         {nodes}
       
diff --git a/ui/src/__snapshots__/Treemap.test.tsx.snap b/ui/src/__snapshots__/Treemap.test.tsx.snap
index 04d51533d1..cde3870ec6 100644
--- a/ui/src/__snapshots__/Treemap.test.tsx.snap
+++ b/ui/src/__snapshots__/Treemap.test.tsx.snap
@@ -13247,12 +13247,6 @@ ResultImpl {
 
 exports[`treemap 2`] = `
 
-
-
-
-