-
-
Notifications
You must be signed in to change notification settings - Fork 984
Exit sub-network via Escape key #3285
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
|
!build |
|
Member
|
I would remove the comment, feels like it doesn't add information. Code looks good. I'll test it later. |
Contributor
Author
|
Ok no issues |
Member
|
I think the comment is fine and even though it does not provide extra information, it helps with skimming over the code |
Member
|
Also fine with me. |
|
|
timon-schelling
approved these changes
Oct 14, 2025
Member
|
Exactly what I wanted I to do. Thanks for contributing :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Previously, pressing the Escape key while inside a sub-network would close the entire node graph overlay, forcing users to lose their navigation context and start over from the beginning. This was frustrating when working with deeply nested networks.
Solution
Modified the DocumentMessage::Escape handler in document_message_handler.rs to check if the user is currently inside a nested network before closing the graph overlay:
If inside a sub-network (breadcrumb path is not empty): Exit one level up using ExitNestedNetwork { steps_back: 1 }
If at the root level (breadcrumb path is empty): Close the graph overlay as before
Changes
Updated document_message_handler.rs - Modified the Escape message handler to conditionally navigate up one level or close the overlay based on the current navigation depth
Testing
The fix can be tested by:
Opening the node graph
Entering a sub-network (double-clicking a node)
Pressing Escape - should return to the parent network
Pressing Escape again at the root level - should close the graph overlay
Benefits
More intuitive navigation behavior
Preserves user context when working with nested networks
Consistent with common UI patterns where Escape means "go back one step"
Closes #3283