NIFI-15819: Adding the navigation card and birdseye control to the co…#11202
Open
mcgilman wants to merge 1 commit intoapache:mainfrom
Open
NIFI-15819: Adding the navigation card and birdseye control to the co…#11202mcgilman wants to merge 1 commit intoapache:mainfrom
mcgilman wants to merge 1 commit intoapache:mainfrom
Conversation
…nnector canvas graph controls panel.
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.
…nnector canvas graph controls panel.
Summary
NIFI-15819
Adds a navigation panel (Zoom In/Out/Fit/Actual, Leave Group) and an embedded birdseye minimap to the connector canvas graph-controls side panel, sitting directly above the existing Connector card. Both are implemented as new reusable presentation components under
apps/nifi/src/app/ui/common/so they can be hosted by any page that already mounts the reusable<reusable-canvas>.What changed
New reusable components (
apps/nifi/src/app/ui/common/)birdseye/—CanvasBirdseyeComponent, a hybrid Canvas + SVG minimap. Uses Canvas to draw simplified component representations (efficient for thousands of nodes) and SVG to host an interactive viewport brush with native D3 drag. Recalculates bounds to include both component extents and the current viewport so the brush stays meaningful when the user pans far from any component. Retina-aware (devicePixelRatioscaling) and auto-sizes viaResizeObserver. Effects react to changes incomponents,transform, andcanvasDimensionsinputs (drag-aware to avoid mid-drag re-renders).birdseye/birdseye.types.ts— extracts theBirdseyeComponentData,BirdseyeTransform, andBirdseyeBoundsinterfaces that previously lived inline incanvas.component.ts.canvas.component.tsnow imports them from the new file (no re-exports).navigation-control/—CanvasNavigationControl, amat-expansion-panelshell with Zoom In/Out/Fit to Screen/Zoom to Actual Size buttons, an optional Leave Group button (shown whencanNavigateToParentis true), and the embedded<canvas-birdseye>. Persists collapsed state inlocalStorageundergraph-control-visibility[<storageKey>]via the sharedStorageservice. ThestorageKeyinput is configurable so independent instances on different pages do not collide.Wiring into the connector canvas (
pages/connectors/ui/connector-canvas/)connector-graph-controlsnow hosts<canvas-navigation-control storageKey="connector-navigation-control" …>above the existing Connector info card and bubbles its zoom / birdseye / leave-group events.connector-canvas.component.tsadds three signals —birdseyeComponents,birdseyeTransform,canvasDimensions— and:(initialized)from the canvas's publicgetBirdseyeComponentData()/getCanvasDimensions()API.loadConnectorFlowSuccessaction (initial load, refresh, process-group navigation), so the minimap stays in sync with the underlying flow.birdseyeTransformfrom the canvas's(transformChange)output.canvasDimensionsonwindow:resize(e.g. when the side panel toggles).CanvasComponentAPI and the existingleaveGroupAction().Architectural note for reviewers
NiFi already has a flow-designer-specific navigation control at
pages/flow-designer/ui/canvas/graph-controls/navigation-control/, but it is tightly coupled to flow-designer NgRx state and the legacyBirdseyeView/CanvasViewservices. Rather than refactor the legacy stack, the new components were built fresh against the reusableCanvasComponentpublic API (signals + outputs). They are presentation-only and have no coupling to flow-designer state, which keeps the legacy flow-designer code path untouched and lets future canvases (e.g. the connector canvas here) opt in.The connector page passes
storageKey="connector-navigation-control"so the new panel persists independently of the legacy flow-designernavigation-controlkey — both can coexist without interference.