NIFI-15654 - Avoid overlapping connections, warn of existing overlaps#10943
Open
rfellows wants to merge 1 commit intoapache:mainfrom
Open
NIFI-15654 - Avoid overlapping connections, warn of existing overlaps#10943rfellows wants to merge 1 commit intoapache:mainfrom
rfellows wants to merge 1 commit intoapache:mainfrom
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
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.
NIFI-15654
Summary
When multiple connections share the same source and destination components with no bend points, they render directly on top of each other, appearing as a single connection. This makes it impossible for users to distinguish, select, or manage the individual connections. This PR addresses the issue with two complementary approaches:
What's Changed
Collision Avoidance
ConnectableBehaviorinto reusable public methods onCanvasUtils(calculateBendPointsForCollisionAvoidance,calculateBendPointsForCollisionAvoidanceByIds)Overlap Detection & Banner
detectOverlappingConnections,wouldRemovalCauseOverlap) inoverlap-detection.utils.tsfor identifying groups of overlapping connectionsselectOverlappingConnectionsNgRx selector that computes overlap groups for the current process groupOverlappingConnectionsBannerComponent— a standalone banner that displays over the canvas with a caution-colored left border stripe, warning icon, and clickable links per overlap groupNavigation
navigateToComponentsNgRx action and effect that navigates to the bulk selection route (/process-groups/:id/bulk/:ids), allowing users to click an overlap link in the banner and immediately see all affected connections selected on the canvasTesting
overlap-detection.utils.tscovering edge cases (no connections, single connections, bidirectional, bend points present, cross-group filtering)CanvasUtilscollision avoidance methods (self-loops, horizontal/vertical offsets, exclusions, existing bend points)OverlappingConnectionsBannerComponent(rendering, interaction, event emission)canvas.component.spec.tsto mock the new banner componentKey Implementation Details
_-theme.scssmixin pattern with--nf-caution-defaultfor the severity stripe and--mat-sys-*tokens for surface/text colors