-
Notifications
You must be signed in to change notification settings - Fork 1
[+] Target node handles limited to one input #61
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
Conversation
|
I did some changes to the way how Node handle works, would you be willing to test the changes. [ Incorporated the logic of "LimitedConnectionHandle" with the "TypedHandle" ] |
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.
Pull request overview
This PR implements a restriction that limits target node handles to accept only one input connection, replacing the previous LimitedConnectionHandle component-based approach with edge-level enforcement in the connection logic. Additionally, it enhances the context menu UX with a modern two-column layout, keyboard navigation, and support for node descriptions.
Key Changes:
- Enforces single-input limitation for target handles at the connection level by filtering out existing connections to the same target handle before adding a new one
- Redesigns the context menu with a split-pane layout showing a searchable node list and a detail panel with descriptions
- Adds keyboard navigation (Arrow keys, Tab, Enter, Escape) and improved search functionality to the context menu
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
frontend/src/types.ts |
Adds optional description field to MenuAction type for displaying node descriptions |
frontend/src/components/ui/ContextMenu.tsx |
Complete redesign with two-column layout, keyboard navigation, fuzzy search enhancements, and description display support |
frontend/src/components/nodes/rotateImageNode.tsx |
Migrates from LimitedConnectionHandle to TypedHandle and adds handle IDs and data types |
frontend/src/components/handle/handleTypes.ts |
Removes obsolete type definitions for the deleted LimitedConnectionHandle component |
frontend/src/components/handle/LimitedConnectionHandle.tsx |
Removes the component as single-input enforcement is now handled at the edge connection level |
frontend/src/App.tsx |
Implements target handle single-input limitation by filtering existing connections before adding new edges, and passes node descriptions to the context menu |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
I’ll review this later tonight and follow up. |
|
@Coder-Harshit I've opened a new pull request, #62, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Coder-Harshit <93333205+Coder-Harshit@users.noreply.github.com>
Fix keyboard navigation crash when context menu has no filtered results
|
Hi, was not able to check any earlier. Currently, a single source is able to provide to only one target, and if I try to make a connection from the source to a new target, it removes the older one, and keeps the new one. Is this an intended behavior? I am asking this because I think that the user might want to provide the same input to multiple nodes. Like providing the same input, to maybe display, and other to rotate, and then display. |
No description provided.