- onLeave?: () => void
- onEnter?: () => void
+ onLeave?: (changeId: string) => void
+ onEnter?: (changeId: string) => void
}>(
({
comment,
@@ -55,8 +55,8 @@ export const ReviewPanelCommentContent = memo<{
return (
onEnter(comment.id))}
+ onMouseLeave={onLeave && (() => onLeave(comment.id))}
>
{thread.messages.map((message, i) => {
const isReply = i !== 0
diff --git a/services/web/frontend/js/features/review-panel-new/components/review-panel-comment.tsx b/services/web/frontend/js/features/review-panel-new/components/review-panel-comment.tsx
index 981c8c4971..ae0535e941 100644
--- a/services/web/frontend/js/features/review-panel-new/components/review-panel-comment.tsx
+++ b/services/web/frontend/js/features/review-panel-new/components/review-panel-comment.tsx
@@ -20,8 +20,8 @@ export const ReviewPanelComment = memo<{
docId: string
top?: number
hoverRanges?: boolean
- onEnter?: () => void
- onLeave?: () => void
+ onEnter?: (changeId: string) => void
+ onLeave?: (changeId: string) => void
hovered?: boolean
}>(({ comment, top, hovered, onEnter, onLeave, docId, hoverRanges }) => {
const threads = useThreadsContext()
@@ -142,8 +142,8 @@ export const ReviewPanelComment = memo<{
position={comment.op.p}
hoverRanges={hoverRanges}
disabled={processing}
- onEnterEntryIndicator={onEnter}
- onLeaveEntryIndicator={onLeave}
+ onEnterEntryIndicator={onEnter && (() => onEnter(comment.id))}
+ onLeaveEntryIndicator={onLeave && (() => onLeave(comment.id))}
entryIndicator="comment"
>
{
top={positions.get(change.id)}
aggregate={aggregatedRanges.aggregates.get(change.id)}
hovered={hoveredEntry === change.id}
- onEnter={() => handleEntryEnter(change.id)}
- onLeave={() => handleEntryLeave(change.id)}
+ onEnter={handleEntryEnter}
+ onLeave={handleEntryLeave}
/>
)
)}
@@ -335,8 +335,8 @@ const ReviewPanelCurrentFile: FC = () => {
comment={comment}
top={positions.get(comment.id)}
hovered={hoveredEntry === comment.id}
- onEnter={() => handleEntryEnter(comment.id)}
- onLeave={() => handleEntryLeave(comment.id)}
+ onEnter={handleEntryEnter}
+ onLeave={handleEntryLeave}
/>
)
)}