You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "mcgilman (via GitHub)" <gi...@apache.org> on 2026/04/14 19:43:19 UTC
[PR] NIFI-15824: Introducing the back/search header and breadcrumbs footer to the connector canvas [nifi]
mcgilman opened a new pull request, #11142:
URL: https://github.com/apache/nifi/pull/11142
## Summary NIFI-15824: Introducing the back/search header and breadcrumbs footer to the connector canvas
Adds the connector canvas header bar (with back navigation, graph controls toggle, and component search) and the footer with process group breadcrumbs. Also promotes shared search types and relocates the `Breadcrumbs` component to `ui/common/` so it can be reused across both the flow designer and connector canvas.
### Header Bar
- New `ConnectorCanvasHeaderBarComponent` with a "back to connectors" link, graph controls chevron toggle, and integrated search.
- New `CanvasHeaderSearchComponent` in `ui/common/` — a standalone, store-free presentation component for typeahead search. Accepts a `searchFn` input and emits `goToComponent` for navigation. Uses signals for reactive state and `debounceTime` for search queries.
- New `ConnectorService.searchConnector()` API method for searching within a connector's flow.
- `searchFn` is guarded against empty `connectorId` (returns `EMPTY`).
- Graph controls open/closed state is persisted to `localStorage`.
### Footer & Breadcrumbs
- New `ConnectorCanvasFooterComponent` displaying process group breadcrumbs.
- `Breadcrumbs` component relocated from `pages/flow-designer/ui/common/` to `ui/common/` to eliminate the architectural violation of a shared component living under a page-specific directory.
- `Breadcrumbs` now accepts a `BreadcrumbRouteGenerator` input so each consumer can supply its own routing logic. The footer uses a `computed` signal to avoid creating a new closure on every change detection cycle.
- Footer's `connectorId` uses `input.required<string>()` signal API.
### Shared Types
- `SearchResultGroup`, `ComponentSearchResult`, `SearchResults`, and `SearchResultsEntity` promoted from the flow designer's search service to `state/shared/index.ts` for cross-feature reuse.
- Flow designer's `SearchService` and `SearchComponent` updated to import from the shared location.
### Search Navigation
- `onSearchGoToComponent` on the connector canvas handles two branches: same process group (select + center) and different process group (navigate with `skipTransform=false`).
- Controller Service and Parameter Provider search result handling is deferred until Effort 9 adds those features to the connector canvas.
### Tests
- Unit tests for all new components (`CanvasHeaderSearchComponent`, `ConnectorCanvasHeaderBarComponent`, `ConnectorCanvasFooterComponent`).
- Extended `ConnectorCanvasComponent` tests for header/footer rendering, graph controls toggle, and both branches of search navigation.
- All tests use `vi.fn()` (Vitest).
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-15824: Introducing the back/search header and breadcrumbs footer to the connector canvas [nifi]
Posted by "rfellows (via GitHub)" <gi...@apache.org>.
rfellows commented on code in PR #11142:
URL: https://github.com/apache/nifi/pull/11142#discussion_r3094410441
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/connectors/ui/connector-canvas/header-bar/connector-canvas-header-bar.component.html:
##########
@@ -0,0 +1,46 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<div class="h-8 connector-header-bar border-b select-none">
+ <div class="flex items-center h-full justify-between">
+ <div class="flex items-center h-full">
+ <button
+ class="h-8 w-8 border-r pointer"
+ data-qa="toggle-graph-controls"
+ (click)="toggleGraphControls.emit()"
+ [title]="graphControlsOpen() ? 'Close graph controls' : 'Open graph controls'">
+ <i
+ class="primary-color fa"
+ [ngClass]="{
+ 'fa-chevron-right': !graphControlsOpen(),
+ 'fa-chevron-left': graphControlsOpen()
+ }"></i>
+ </button>
+ <div class="flex items-center px-5">
+ <a class="primary-color cursor-pointer" data-qa="back-to-connectors" (click)="backToConnectors.emit()">
+ <i class="fa fa-arrow-left mr-2"></i>Installed connectors
Review Comment:
To be consistent with nifi conventions, we probably want to make this "Installed Connectors"
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/canvas-header-search/canvas-header-search.component.html:
##########
@@ -0,0 +1,230 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<div class="h-full flex justify-around search-container border-l" [class.open]="searchInputVisible()">
+ <button
+ class="w-8"
+ aria-label="Search canvas"
+ [attr.aria-expanded]="searchInputVisible()"
+ (click)="toggleSearchVisibility()">
+ <i class="fa fa-search primary-color"></i>
+ </button>
+ <ng-template
+ cdkConnectedOverlay
+ [cdkConnectedOverlayDisableClose]="true"
+ [cdkConnectedOverlayOrigin]="searchInput"
+ [cdkConnectedOverlayOpen]="searching() || searchingResultsVisible()"
+ [cdkConnectedOverlayPositions]="positions"
+ [cdkConnectedOverlayHasBackdrop]="true"
+ [cdkConnectedOverlayBackdropClass]="'cdk-overlay-transparent-backdrop'"
+ (overlayOutsideClick)="backdropClicked($event)">
+ <div class="search-results w-96 border p-2 text-base max-h-96 overflow-y-auto">
+ @if (searching()) {
+ <div class="unset neutral-color italic" role="status">Searching</div>
+ } @else {
+ @if (hasResults()) {
+ <ul role="listbox" aria-label="Search results">
+ @if (results().processorResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().processorResults,
+ header: 'Processors',
+ icon: 'icon-processor',
+ path: ComponentType.Processor
+ }
+ "></ng-container>
+ }
+ @if (results().connectionResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().connectionResults,
+ header: 'Connections',
+ icon: 'icon-connect',
+ path: ComponentType.Connection
+ }
+ "></ng-container>
+ }
+ @if (results().processGroupResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().processGroupResults,
+ header: 'Process groups',
+ icon: 'icon-group',
+ path: ComponentType.ProcessGroup
+ }
+ "></ng-container>
+ }
+ @if (results().remoteProcessGroupResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().remoteProcessGroupResults,
+ header: 'Remote process groups',
+ icon: 'icon-group-remote',
+ path: ComponentType.RemoteProcessGroup
+ }
+ "></ng-container>
+ }
+ @if (results().inputPortResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().inputPortResults,
+ header: 'Input ports',
+ icon: 'icon-port-in',
+ path: ComponentType.InputPort
+ }
+ "></ng-container>
+ }
+ @if (results().outputPortResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().outputPortResults,
+ header: 'Output ports',
+ icon: 'icon-port-out',
+ path: ComponentType.OutputPort
+ }
+ "></ng-container>
+ }
+ @if (results().funnelResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().funnelResults,
+ header: 'Funnels',
+ icon: 'icon-funnel',
+ path: ComponentType.Funnel
+ }
+ "></ng-container>
+ }
+ @if (results().labelResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().labelResults,
+ header: 'Labels',
+ icon: 'icon-label',
+ path: ComponentType.Label
+ }
+ "></ng-container>
+ }
+ @if (results().controllerServiceNodeResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().controllerServiceNodeResults,
+ header: 'Controller services',
Review Comment:
The casing is different here (sentence case) vs in flow designer where it uses title case. this applies to the other multi-word header groupings here.
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-15824: Introducing the back/search header and breadcrumbs footer to the connector canvas [nifi]
Posted by "rfellows (via GitHub)" <gi...@apache.org>.
rfellows merged PR #11142:
URL: https://github.com/apache/nifi/pull/11142
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-15824: Introducing the back/search header and breadcrumbs footer to the connector canvas [nifi]
Posted by "rfellows (via GitHub)" <gi...@apache.org>.
rfellows commented on PR #11142:
URL: https://github.com/apache/nifi/pull/11142#issuecomment-4254306344
Reviewing...
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-15824: Introducing the back/search header and breadcrumbs footer to the connector canvas [nifi]
Posted by "rfellows (via GitHub)" <gi...@apache.org>.
rfellows commented on code in PR #11142:
URL: https://github.com/apache/nifi/pull/11142#discussion_r3088790100
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/connectors/ui/connector-canvas/connector-canvas.component.ts:
##########
@@ -224,6 +236,28 @@ export class ConnectorCanvasComponent implements OnInit, OnDestroy {
return !['input', 'textarea', 'select'].includes(tagName);
}
+ toggleGraphControls(): void {
+ this.graphControlsOpen = !this.graphControlsOpen;
+ localStorage.setItem(GRAPH_CONTROLS_STORAGE_KEY, String(this.graphControlsOpen));
+ }
+
+ onSearchGoToComponent(event: { id: string; type: ComponentType; groupId: string }): void {
+ if (event.groupId === this.currentProcessGroupId) {
+ this.onSelectComponents([{ id: event.id, type: event.type }]);
+ this.canvasComponent().centerOnComponent(event.id, event.type);
+ } else {
+ this.store.dispatch(ConnectorCanvasActions.setSkipTransform({ skipTransform: false }));
+ this.router.navigate([
+ '/connectors',
+ this.currentConnectorId,
+ 'canvas',
+ event.groupId,
+ event.type,
+ event.id
+ ]);
Review Comment:
For ParameterProvider results, this navigates to something like /connectors/:id/canvas/:parentGroupId/ParameterProvider/:resultId — which is a canvas process group route, not a settings/parameter-provider route. The component type ParameterProvider isn't a valid canvas component, so it effectively just navigates to the process group.
The same issue applies to Parameter Contexts, Parameters, and Controller Services — all of which have special-case routing in the flow-designer search but are treated as generic canvas components in the new shared search component.
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/canvas-header-search/canvas-header-search.component.html:
##########
@@ -0,0 +1,230 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<div class="h-full flex justify-around search-container border-l" [class.open]="searchInputVisible()">
+ <button
+ class="w-8"
+ aria-label="Search canvas"
+ [attr.aria-expanded]="searchInputVisible()"
+ (click)="toggleSearchVisibility()">
+ <i class="fa fa-search primary-color"></i>
+ </button>
+ <ng-template
+ cdkConnectedOverlay
+ [cdkConnectedOverlayDisableClose]="true"
+ [cdkConnectedOverlayOrigin]="searchInput"
+ [cdkConnectedOverlayOpen]="searching() || searchingResultsVisible()"
+ [cdkConnectedOverlayPositions]="positions"
+ [cdkConnectedOverlayHasBackdrop]="true"
+ [cdkConnectedOverlayBackdropClass]="'cdk-overlay-transparent-backdrop'"
+ (overlayOutsideClick)="backdropClicked($event)">
+ <div class="search-results w-96 border p-2 text-base max-h-96 overflow-y-auto">
+ @if (searching()) {
+ <div class="unset neutral-color italic" role="status">Searching</div>
+ } @else {
+ @if (hasResults()) {
+ <ul role="listbox" aria-label="Search results">
+ @if (results().processorResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().processorResults,
+ header: 'Processors',
+ icon: 'icon-processor',
+ path: ComponentType.Processor
+ }
+ "></ng-container>
+ }
+ @if (results().connectionResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().connectionResults,
+ header: 'Connections',
+ icon: 'icon-connect',
+ path: ComponentType.Connection
+ }
+ "></ng-container>
+ }
+ @if (results().processGroupResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().processGroupResults,
+ header: 'Process groups',
+ icon: 'icon-group',
+ path: ComponentType.ProcessGroup
+ }
+ "></ng-container>
+ }
+ @if (results().remoteProcessGroupResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().remoteProcessGroupResults,
+ header: 'Remote process groups',
+ icon: 'icon-group-remote',
+ path: ComponentType.RemoteProcessGroup
+ }
+ "></ng-container>
+ }
+ @if (results().inputPortResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().inputPortResults,
+ header: 'Input ports',
+ icon: 'icon-port-in',
+ path: ComponentType.InputPort
+ }
+ "></ng-container>
+ }
+ @if (results().outputPortResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().outputPortResults,
+ header: 'Output ports',
+ icon: 'icon-port-out',
+ path: ComponentType.OutputPort
+ }
+ "></ng-container>
+ }
+ @if (results().funnelResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().funnelResults,
+ header: 'Funnels',
+ icon: 'icon-funnel',
+ path: ComponentType.Funnel
+ }
+ "></ng-container>
+ }
+ @if (results().labelResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().labelResults,
+ header: 'Labels',
+ icon: 'icon-label',
+ path: ComponentType.Label
+ }
+ "></ng-container>
+ }
+ @if (results().controllerServiceNodeResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().controllerServiceNodeResults,
+ header: 'Controller services',
+ icon: '',
+ path: ComponentType.ControllerService
+ }
+ "></ng-container>
+ }
+ @if (results().parameterProviderNodeResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().parameterProviderNodeResults,
+ header: 'Parameter providers',
+ icon: '',
+ path: ComponentType.ParameterProvider
+ }
+ "></ng-container>
+ }
+ @if (results().parameterContextResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().parameterContextResults,
+ header: 'Parameter contexts',
+ icon: '',
+ path: ComponentType.Flow
+ }
+ "></ng-container>
+ }
+ @if (results().parameterResults.length > 0) {
+ <ng-container
+ *ngTemplateOutlet="
+ renderResults;
+ context: {
+ $implicit: results().parameterResults,
+ header: 'Parameters',
+ icon: '',
+ path: ComponentType.Flow
+ }
+ "></ng-container>
+ }
+ </ul>
+ } @else {
+ <div class="unset neutral-color italic" role="status">No results matched the search terms</div>
+ }
+ }
+ </div>
+ </ng-template>
+ <input
+ type="text"
+ matInput
+ placeholder="Search"
+ aria-label="Search canvas components"
+ class="search-input neutral-contrast"
+ (keydown)="onKeydown($event)"
+ [class.open]="searchInputVisible()"
+ [formControl]="searchControl"
+ cdkOverlayOrigin
+ #searchInput="cdkOverlayOrigin" />
+ <ng-template #renderResults let-results let-header="header" let-icon="icon" let-path="path">
+ @if (results.length > 0) {
+ <li class="flex items-center" role="presentation">
+ @if (icon) {
+ <span class="icon mr-1 tertiary-color" [class]="icon"></span>
+ }
+ <span class="font-medium">{{ header }}</span>
+ </li>
+ @for (result of results; track result.id) {
Review Comment:
This `track by result.id` doesn't seem to uniquely identify the items. There are many warnings logged on the dev console when doing a simple search.
```
NG0955: The provided track expression resulted in duplicated keys for a given collection. Adjust the tracking expression such that it uniquely identifies all the items in the collection. Duplicated keys were:
key "2c3db624-019a-1000-01c8-dbcf476ff08d" at index "0" and "4",
key "2c3db624-019a-1000-01c8-dbcf476ff08d" at index "4" and "8",
key "2c3db624-019a-1000-01c8-dbcf476ff08d" at index "8" and "12",
key "2c3db624-019a-1000-01c8-dbcf476ff08d" at index "12" and "16",
key "2c3db624-019a-1000-01c8-dbcf476ff08d" at index "16" and "20",
...
```
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org