-
Notifications
You must be signed in to change notification settings - Fork 448
Add functionality to quickly disconnect moved input links #7459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
When a link is dragged only a short disctance from an input slot before being dropped on canvas, immediately disconnect it instead of displaying the node search dialogue
Only applied on input links Once snapped, stays disabled Simplified logic Some actual themeing
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThis PR enhances link dragging interactions by introducing visual feedback circles for input links, implementing proximity-based disconnect behavior controlled by a Changes
Sequence DiagramsequenceDiagram
participant User
participant useSlotLinkInteraction
participant linkConnectorAdapter
participant LGraphCanvas
participant MovingInputLink
participant LinkConnector
User->>useSlotLinkInteraction: Drag from input slot
useSlotLinkInteraction->>linkConnectorAdapter: beginFromInput(nodeId, index, {layout, moveExisting})
linkConnectorAdapter->>linkConnectorAdapter: Apply layout positioning
linkConnectorAdapter->>MovingInputLink: Create/configure link
loop During drag
User->>LGraphCanvas: Mouse move
LGraphCanvas->>MovingInputLink: drawConnectionCircle(ctx, mousePos)
MovingInputLink->>MovingInputLink: Compute distance to target
alt Distance within radius
MovingInputLink->>MovingInputLink: Set disconnectOnDrop = true
else Distance beyond radius
MovingInputLink->>MovingInputLink: Set disconnectOnDrop = false
end
LGraphCanvas->>LGraphCanvas: Render visual feedback
end
User->>LinkConnector: Release mouse (drop)
LinkConnector->>MovingInputLink: Check disconnectOnDrop flag
alt disconnectOnDrop is true
LinkConnector->>MovingInputLink: Remove from renderLinks
end
Possibly related PRs
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 12/16/2025, 01:33:37 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Test Results❌ Some tests failed ⏰ Completed at: 12/16/2025, 02:14:32 AM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.24 MB (baseline 3.24 MB) • 🔴 +1.39 kBMain entry bundles and manifests
Status: 3 added / 3 removed Graph Workspace — 990 kB (baseline 990 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 6.54 kB (baseline 6.54 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 1 added / 1 removed Panels & Settings — 298 kB (baseline 298 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 6 added / 6 removed UI Components — 184 kB (baseline 184 kB) • ⚪ 0 BReusable component library chunks
Status: 9 added / 9 removed Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 3 added / 3 removed Utilities & Hooks — 3.18 kB (baseline 3.18 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 1 added / 1 removed Vendor & Third-Party — 8.56 MB (baseline 8.56 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Status: 5 added / 5 removed Other — 3.75 MB (baseline 3.75 MB) • ⚪ 0 BBundles that do not match a named category
Status: 24 added / 24 removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
src/lib/litegraph/src/LGraphCanvas.ts(2 hunks)src/lib/litegraph/src/canvas/LinkConnector.ts(2 hunks)src/lib/litegraph/src/canvas/MovingInputLink.ts(4 hunks)src/renderer/core/canvas/links/linkConnectorAdapter.ts(2 hunks)src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
src/**/*.{vue,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json
Files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.tssrc/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.tssrc/renderer/core/canvas/links/linkConnectorAdapter.tssrc/lib/litegraph/src/LGraphCanvas.ts
src/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safetyMinimize the surface area (exported values) of each module and composable
Files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.tssrc/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.tssrc/renderer/core/canvas/links/linkConnectorAdapter.tssrc/lib/litegraph/src/LGraphCanvas.ts
src/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (src/CLAUDE.md)
src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase
Files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.tssrc/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.tssrc/renderer/core/canvas/links/linkConnectorAdapter.tssrc/lib/litegraph/src/LGraphCanvas.ts
src/**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (src/CLAUDE.md)
Follow Vue 3 composition API style guide
Files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.tssrc/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.tssrc/renderer/core/canvas/links/linkConnectorAdapter.tssrc/lib/litegraph/src/LGraphCanvas.ts
src/lib/litegraph/**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)
src/lib/litegraph/**/*.{js,ts,jsx,tsx}: Run ESLint instead of manually figuring out whitespace fixes or other trivial style concerns using thepnpm lint:fixcommand
Take advantage ofTypedArraysubarraywhen appropriate
Thesizeandposproperties ofRectangleshare the same array buffer (subarray); they may be used to set the rectangle's size and position
Prefer single lineifsyntax over adding curly braces, when the statement has a very concise expression and concise, single line statement
Do not replace&&=or||=with=when there is no reason to do so. If you do find a reason to remove either&&=or||=, leave a comment explaining why the removal occurred
When writing methods, prefer returning idiomatic JavaScriptundefinedovernull
Files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.tssrc/lib/litegraph/src/LGraphCanvas.ts
src/lib/litegraph/**/*.{ts,tsx}
📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)
Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code
Files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.tssrc/lib/litegraph/src/LGraphCanvas.ts
**/*.{ts,tsx,js,jsx,vue,json}
📄 CodeRabbit inference engine (AGENTS.md)
Code style: Use 2-space indentation, single quotes, no trailing semicolons, and 80-character line width (see
.prettierrc)
Files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.tssrc/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.tssrc/renderer/core/canvas/links/linkConnectorAdapter.tssrc/lib/litegraph/src/LGraphCanvas.ts
**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,vue}: Imports must be sorted and grouped by plugin; runpnpm formatbefore committing
Use TypeScript for type safety; never useanytype - use proper TypeScript types
Never useas anytype assertions; fix the underlying type issue instead
Use es-toolkit for utility functions
Write code that is expressive and self-documenting; avoid comments unless absolutely necessary; do not add or retain redundant comments
Keep functions short and functional
Minimize nesting in code (e.g., deeply nestediforforstatements); apply the Arrow Anti-Pattern principle
Avoid mutable state; prefer immutability and assignment at point of declaration
Favor pure functions, especially testable ones
Files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.tssrc/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.tssrc/renderer/core/canvas/links/linkConnectorAdapter.tssrc/lib/litegraph/src/LGraphCanvas.ts
src/**/{services,composables}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (src/CLAUDE.md)
src/**/{services,composables}/**/*.{ts,tsx}: Useapi.apiURL()for backend endpoints instead of constructing URLs directly
Useapi.fileURL()for static file access instead of constructing URLs directly
Files:
src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts
src/**/{composables,components}/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (src/CLAUDE.md)
Clean up subscriptions in state management to prevent memory leaks
Files:
src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts
src/**/{components,composables}/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (src/CLAUDE.md)
Use vue-i18n for ALL user-facing strings by adding them to
src/locales/en/main.json
Files:
src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts
🧠 Learnings (12)
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Do not replace `&&=` or `||=` with `=` when there is no reason to do so. If you do find a reason to remove either `&&=` or `||=`, leave a comment explaining why the removal occurred
Applied to files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup
Applied to files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.tssrc/renderer/core/canvas/links/linkConnectorAdapter.tssrc/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues
Applied to files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.tssrc/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{ts,tsx} : Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code
Applied to files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.ts : Use es-toolkit for utility functions
Applied to files:
src/lib/litegraph/src/canvas/LinkConnector.ts
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.
Applied to files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.tssrc/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.tssrc/renderer/core/canvas/links/linkConnectorAdapter.tssrc/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.
Applied to files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.tssrc/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.tssrc/renderer/core/canvas/links/linkConnectorAdapter.tssrc/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.
Applied to files:
src/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/MovingInputLink.tssrc/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.tssrc/renderer/core/canvas/links/linkConnectorAdapter.tssrc/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Take advantage of `TypedArray` `subarray` when appropriate
Applied to files:
src/lib/litegraph/src/canvas/MovingInputLink.tssrc/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : When writing methods, prefer returning idiomatic JavaScript `undefined` over `null`
Applied to files:
src/lib/litegraph/src/canvas/MovingInputLink.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{js,ts,jsx,tsx} : When adding features, always write vitest unit tests using cursor rules in @.cursor
Applied to files:
src/lib/litegraph/src/canvas/MovingInputLink.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Prefer single line `if` syntax over adding curly braces, when the statement has a very concise expression and concise, single line statement
Applied to files:
src/lib/litegraph/src/canvas/MovingInputLink.ts
🧬 Code graph analysis (4)
src/lib/litegraph/src/canvas/LinkConnector.ts (2)
src/lib/litegraph/src/Reroute.ts (1)
remove(476-481)src/lib/litegraph/src/canvas/MovingInputLink.ts (1)
MovingInputLink(20-153)
src/lib/litegraph/src/canvas/MovingInputLink.ts (2)
src/lib/litegraph/src/interfaces.ts (1)
Point(229-229)src/lib/litegraph/src/litegraph.ts (1)
LiteGraph(17-17)
src/renderer/core/canvas/links/linkConnectorAdapter.ts (1)
src/renderer/core/layout/types.ts (2)
RerouteId(42-42)SlotLayout(55-61)
src/lib/litegraph/src/LGraphCanvas.ts (2)
src/lib/litegraph/src/canvas/MovingInputLink.ts (1)
MovingInputLink(20-153)src/lib/litegraph/src/litegraph.ts (1)
MovingInputLink(167-167)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: deploy-and-comment
- GitHub Check: lint-and-format
- GitHub Check: test
- GitHub Check: setup
- GitHub Check: collect
🔇 Additional comments (6)
src/lib/litegraph/src/canvas/LinkConnector.ts (1)
1-1: The import and implementation are correct; no action needed.The use of
es-toolkit'sremove()function is appropriate—it's an established dependency (^1.39.9) already used throughout the codebase. The type assertion(link as MovingLinkBase)is safe becauseMovingInputLinkextendsMovingLinkBaseand implements thedisconnect()method. ThedisconnectOnDropflag is intentionally updated during dragging viadrawConnectionCircle()and correctly reflects the cursor proximity at drop time—not a stale value, but live state.src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts (1)
673-676: No changes needed. Thelayoutobject fromlayoutStore.getSlotLayout()is only read bybeginFromInput()(accessingposition.xandposition.y); the adapter does not mutate it. Passing the store-owned reference directly is safe.src/lib/litegraph/src/canvas/MovingInputLink.ts (2)
2-2: LGTM: Import added for runtime constant access.The non-type import of
LiteGraphis correctly used to accessWIDGET_OUTLINE_COLORin the new rendering method.
28-28: LGTM: Property correctly declared and initialized.The
disconnectOnDropflag is appropriately initialized totrue, enabling the disconnect-on-drop behavior by default.Also applies to: 43-43
src/renderer/core/canvas/links/linkConnectorAdapter.ts (2)
1-1: LGTM: Type import correctly added.Proper use of
import typefor theSlotLayoutinterface.
85-89: No issues to address. The code correctly uses the standard LiteGraph slot API.The
posproperty is a documented, optional property of slot objects (declared inSlotBase.ts:35and implemented inNodeSlot.ts:35) designed to store "the centre point of the slot." Settinginput.posbefore callingdragNewFromInputormoveInputLinkis the intended usage pattern, not a side effect or maintainability concern. Other parts of the codebase (e.g.,LGraphCanvas.ts:5672) explicitly expectinput.posto be set, and lifecycle cleanup (e.g.,SubgraphNode.ts:217deletinginput.pos) is already handled appropriately. This follows the established LiteGraph API design.
| opts?: { | ||
| moveExisting?: boolean | ||
| fromRerouteId?: RerouteId | ||
| layout: SlotLayout | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type inconsistency: layout should be optional.
The type declares layout: SlotLayout (required when opts is present), but line 85 checks opts?.layout, treating it as optional. This mismatch weakens type safety.
Apply this diff to correct the type:
opts?: {
moveExisting?: boolean
fromRerouteId?: RerouteId
- layout: SlotLayout
+ layout?: SlotLayout
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| opts?: { | |
| moveExisting?: boolean | |
| fromRerouteId?: RerouteId | |
| layout: SlotLayout | |
| } | |
| opts?: { | |
| moveExisting?: boolean | |
| fromRerouteId?: RerouteId | |
| layout?: SlotLayout | |
| } |
🤖 Prompt for AI Agents
In src/renderer/core/canvas/links/linkConnectorAdapter.ts around lines 76 to 80,
the opts type currently declares layout as required (layout: SlotLayout) but the
code treats opts?.layout as optional; change the opts type so layout is optional
(layout?: SlotLayout) to match usage and restore type safety. Update the type
definition only (making layout optional) and run TypeScript checks to ensure no
other call-sites relied on layout being mandatory; if any call-sites assumed
layout exists, add safe guards (e.g., optional chaining or defaults) where
necessary.
| opts?: { | ||
| moveExisting?: boolean | ||
| fromRerouteId?: RerouteId | ||
| layout: SlotLayout | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Required before Optional
| opts?: { | |
| moveExisting?: boolean | |
| fromRerouteId?: RerouteId | |
| layout: SlotLayout | |
| } | |
| opts?: { | |
| layout: SlotLayout | |
| moveExisting?: boolean | |
| fromRerouteId?: RerouteId | |
| } |
Moving the draw operation to the background means that the distance check logic was no longer being tracked. since only a single bg draw was made. This is slightly less than ideal, but it's reasonable to expect that the user will continually be dragging the mouse when moving links
|
Stupid question, doesn't ctrl+alt+click doing this already? |
|
Yes. The functionality is similar and ctrl+alt+click is not being removed. This functionality is
But I do value your opinon. Is there a problem I've missed? |
Unless the user doesn't read patch nodes and is expecting the default setting of If this is an opt-in behavior that will be added under the existing The me that knows short link release will disconnect wants this. The me that didn't know that was an intentional change would be filing a bug report for link release being inconsistently broken. :v |
Disconnections are frequently performed by dragging a link from an input slot and dropping it on the canvas, but needing to wait for the searchbox to pop up, and then needing to manually close out of this can make it feel slow. Sometimes, this will even result in users disabling the link release action for more responsive graph building.
Instead, this PR introduces new functionality where a link which is moved only a short distance from a node input and dropped will be immediately disconnected instead of performing the default link release action.

┆Issue is synchronized with this Notion page by Unito