Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
simplify tests
  • Loading branch information
christian-byrne authored and DrJKL committed Oct 22, 2025
commit cfe067631c90875ae579cbbc4e8dae2ef5e422ba
28 changes: 27 additions & 1 deletion src/renderer/extensions/vueNodes/components/LGraphNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ import {
} from '@/utils/graphTraversalUtil'
import { cn } from '@/utils/tailwindUtil'

import { cornerResizeHandles } from '../interactions/resize/resizeHandlePresets'
import type { ResizeHandleDirection } from '../interactions/resize/resizeMath'
import { useNodeResize } from '../interactions/resize/useNodeResize'
import { calculateIntrinsicSize } from '../utils/calculateIntrinsicSize'
Expand Down Expand Up @@ -295,6 +294,33 @@ const baseResizeHandleClasses =
'absolute h-3 w-3 opacity-0 pointer-events-auto focus-visible:outline focus-visible:outline-2 focus-visible:outline-white/40'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[performance] low Priority

Issue: Resize handles always rendered but invisible by default
Context: All 4 handles are rendered in DOM with opacity-0, which creates unnecessary DOM nodes
Suggestion: Consider using v-show or CSS-only hover reveal to avoid DOM overhead when not needed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented in 68255c9 (removed in feda4d9 to keep handles invisible)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed (handles remain invisible with cursor-only indication)

const POSITION_EPSILON = 0.01
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[quality] low Priority

Issue: Magic number POSITION_EPSILON without explanation
Context: Value 0.01 is used to check position changes but lacks documentation about why this threshold was chosen
Suggestion: Add comment explaining the epsilon value rationale or extract to a named constant with documentation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skipping - unclear rationale for the threshold


const cornerResizeHandles = [
{
id: 'se',
direction: { horizontal: 'right', vertical: 'bottom' } as const,
classes: 'right-0 bottom-0 cursor-se-resize'
},
{
id: 'ne',
direction: { horizontal: 'right', vertical: 'top' } as const,
classes: 'right-0 top-0 cursor-ne-resize'
},
{
id: 'sw',
direction: { horizontal: 'left', vertical: 'bottom' } as const,
classes: 'left-0 bottom-0 cursor-sw-resize'
},
{
id: 'nw',
direction: { horizontal: 'left', vertical: 'top' } as const,
classes: 'left-0 top-0 cursor-nw-resize'
}
] satisfies Array<{
id: string
direction: ResizeHandleDirection
classes: string
}>

const { startResize } = useNodeResize(
(result, element) => {
if (isCollapsed.value) return
Expand Down

This file was deleted.