Matt Gilman created NIFI-16449:
----------------------------------
Summary: Promote canvas Create/Edit dialogs to reusable
output-driven components
Key: NIFI-16449
URL: https://issues.apache.org/jira/browse/NIFI-16449
Project: Apache NiFi
Issue Type: Improvement
Components: Core UI
Reporter: Matt Gilman
h2. Background
Canvas component Create/Edit dialogs currently have mixed ownership.
Create dialogs are located under the legacy flow-designer feature and dispatch
flow-designer NgRx actions directly. Although Edit dialogs are under
ui/common/component-dialogs, some still depend on page-specific state or
behavior.
This prevents the reusable canvas and connector canvas from using these dialogs
with their own state, effects, API boundaries, error contexts, and saving state.
NIFI-16447 exposes typed reusable-canvas mutation intent, including
createConnectionRequested, but connection creation cannot be completed cleanly
until the Create Connection dialog emits intent instead of dispatching
flow-designer actions.
h2. Goals
* Make canvas Create/Edit dialogs reusable by flow designer, connector canvas,
and other canvas hosts.
* Make dialogs emit typed user intent without dispatching page-specific NgRx
actions.
* Let each host own persistence, saving state, error handling, and response
reconciliation.
* Preserve existing flow-designer behavior and appearance.
h2. Scope
h3. Shared dialog placement
Move or consolidate the following flow-designer Create dialogs under
ui/common/component-dialogs:
* Create Processor
* Create Port
* Create Process Group
* Create Remote Process Group
* Create Connection
Review related component-creation dialogs, including label creation/editing,
grouping, and registry import, and promote those required by reusable-canvas
hosts.
h3. Dialog contracts
* Replace direct Store dispatch with typed outputs.
* Receive saving state, breadcrumbs, extension metadata, child ports,
defaults, and other host-owned data through inputs or callbacks.
* Keep form construction and validation inside the dialog.
* Keep API requests and NgRx actions outside the dialog.
* Support host-specific error contexts without coupling the dialog to one page.
* Use canonical entity and request types from shared flow contracts.
h3. Flow designer integration
* Open shared dialogs from flow-designer effects.
* Translate dialog outputs into existing flow-designer actions.
* Preserve current behavior, appearance, defaults, error handling, and
navigation.
h3. Connector canvas integration
* Open shared dialogs from connector effects.
* Translate dialog outputs into connector-scoped typed actions.
* Complete createConnectionRequested integration introduced by NIFI-16447.
* Use connector-scoped services, saving state, error context, and
revision-aware reconciliation.
* Keep mutation commands gated by troubleshooting state and permissions.
h3. Edit dialogs
Review the existing shared Edit dialogs and remove remaining page-specific
Store dispatch or state dependencies so both canvas hosts can use the same
components.
h2. Out of Scope
* Entering or ending troubleshooting mode.
* Changes to backend REST semantics.
* New component operations such as start, stop, enable, or disable.
* Visual redesign of the dialogs.
* Changes to connection eligibility rules.
h2. Acceptance Criteria
* Shared Create/Edit dialogs do not dispatch flow-designer or connector NgRx
actions directly.
* Dialogs expose typed outputs for save/create intent.
* Flow designer retains its current behavior and appearance.
* Connector canvas can create a connection through its own actions, effects,
service, and reducer.
* Connector requests use the local client ID and canonical request payloads.
* Successful connector requests reconcile typed entity collections.
* Failed connector requests retain or restore optimistic UI state and use the
connector error context.
* Dialog cancellation cleans up temporary canvas previews.
* Unit tests cover both flow-designer and connector-host integration.
* Frontend lint, strict type-check, unit tests, and production build pass.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)