mcgilman opened a new pull request, #11138:
URL: https://github.com/apache/nifi/pull/11138
**Title:** NIFI-15818: Route-backed component selection for the connector
canvas
**Body:**
## Summary
- Implements route-backed component selection for the connector canvas so
that selecting a component on the canvas updates the URL and deep-linking to a
component URL centers the viewport on it
- Adds `selectComponents`, `deselectAllComponents`, and
`navigateWithoutTransform` actions with corresponding effects, reducer
handlers, and component wiring
- Fixes a corner case where dispatching `selectComponents` with an empty
components array would navigate to an invalid route; it now correctly delegates
to `deselectAllComponents`
## Details
**Selection routing:** Clicking a single component routes to
`/connectors/:id/canvas/:processGroupId/:type/:componentId`. Selecting multiple
components routes to `.../bulk/:id1,:id2,...`. Clicking the canvas background
deselects all and returns to the base canvas route. All selection-initiated
navigations use `replaceUrl: true` to avoid polluting browser history.
**`skipTransform` mechanism:** When the user selects a component on the
canvas, `navigateWithoutTransform` sets `skipTransform: true` in the reducer so
the resulting route change does not auto-center the viewport. When a deep link
is opened directly, `skipTransform` is false, so `onCanvasInitialized` calls
`centerOnSelection()` to center the viewport on the selected component(s).
**`leaveProcessGroup$` update:** Refactored to use the
`navigateWithoutTransform` action (instead of direct `router.navigate` +
`setSkipTransform`) after navigating to the parent process group and waiting
for the flow to load. This auto-selects the child process group in the parent
view, giving the user a visual reference of where they came from.
**Test cleanup:** Converted all effects tests from the `new
Promise<void>((resolve) => { setup().then(...) })` anti-pattern to
`async/await` with `firstValueFrom` from RxJS.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]