Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert unnecessary Tooltip changes
Browse files Browse the repository at this point in the history
nickgros committed Dec 5, 2024
1 parent 16a3dc4 commit baf8856
Showing 1 changed file with 4 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -254,19 +254,6 @@ export function Node(
// We only use this for pagination nodes. If the pagination node comes into view, then immediately call `getNextPageOfChildren`
const { ref, inView } = useInView()

const positionRef = React.useRef<{ x: number; y: number }>({
x: 0,
y: 0,
})
const popperRef = React.useRef<Instance>(null)
const nameElementRef = React.useRef<HTMLDivElement>(null)
const handleMouseMove = (event: React.MouseEvent) => {
positionRef.current = { x: event.clientX, y: event.clientY }

if (popperRef.current != null) {
popperRef.current.update()
}
}
useEffect(() => {
if (isPaginationNode(node) && inView) {
getNextPageOfChildren()
@@ -343,7 +330,6 @@ export function Node(

return (
<div
ref={ref}
className={`Node ${
treeNodeType === EntityTreeNodeType.SINGLE_PANE
? 'SelectNode'
@@ -387,25 +373,11 @@ export function Node(
</div>
)}

<div
className="EntityName"
ref={nameElementRef}
onMouseMove={handleMouseMove}
>
<Tooltip
title={tooltipContent}
placement="right"
slotProps={{
popper: {
// Ensure the tooltip is appended to the end of the visible text, not the end of the overflowing text
popperRef,
anchorEl: nameElementRef.current,
},
}}
>
<Tooltip title={tooltipContent} placement="right">
<div className="EntityName" ref={ref}>
{nodeText}
</Tooltip>
</div>
</div>
</Tooltip>

{treeNodeType === EntityTreeNodeType.SINGLE_PANE && (
<EntityBadgeIcons

0 comments on commit baf8856

Please sign in to comment.