rfellows opened a new pull request, #11559: URL: https://github.com/apache/nifi/pull/11559
# NIFI-16217: Prompt to save before navigating to an inherited Parameter Context ## Summary Navigating from the Parameter Context edit dialog to an inherited parameter previously discarded any unsaved edits without warning. Users could lose local form changes simply by following an inherited parameter link. This change adds a save-before-navigate flow for that action. When the edit form is dirty, NiFi prompts with **Save**, **Don't Save**, or **Cancel**. Choosing **Save** persists the update and keeps the user on the completed update review so they can explicitly continue with **Go to Parameter**—there is no automatic navigation after save. Clean forms navigate immediately; invalid dirty forms disable **Save** so users can discard and continue or cancel and keep editing. JIRA: [NIFI-16217](https://issues.apache.org/jira/browse/NIFI-16217) ## Decision flow ```mermaid flowchart TD A[User clicks Go to inherited Parameter] --> B{Edit form dirty?} B -->|No - clean| C[Navigate to inherited Parameter Context] B -->|Yes - dirty| D{Form valid / saveable?} D -->|Valid| E[Unsaved Changes dialog<br/>Save / Don't Save / Cancel] D -->|Invalid| F[Unsaved Changes dialog<br/>Save disabled / Don't Save / Cancel] E -->|Cancel| G[Stay on current edit dialog] F -->|Cancel| G E -->|Don't Save| C F -->|Don't Save| C E -->|Save| H[Submit Parameter Context update] H --> I[Show completed update review<br/>Close + Go to Parameter] I -->|Close| J[Close dialog - no navigation] I -->|Go to Parameter| C note1[No auto-navigate after save] H -.-> note1 ``` ## What's Changed - Intercept navigation to an inherited Parameter from the Parameter Context edit dialog when the form has unsaved changes - Add an **Unsaved Changes** confirmation dialog with **Save**, **Don't Save**, and **Cancel** - Disable **Save** (and focus **Don't Save**) when the form is dirty but not in a saveable state - On **Save**, submit the Parameter Context update and retain pending navigation until the user chooses **Go to Parameter** on the completed update review (no auto-navigate) - On **Don't Save**, discard pending edits and navigate; on **Cancel**, remain in the current edit dialog - Carry optional `highlightedParameterName` through open/edit navigation so the target parameter can be highlighted after arrival - Extend Parameter Context listing NgRx state/effects/selectors for pending post-update navigation - Add unit coverage for the confirmation dialog, edit-dialog review actions, parameter-table go-to behavior, and listing effects/reducer paths ## Test plan - [ ] With a clean Parameter Context edit form, click an inherited parameter and confirm navigation proceeds immediately (no prompt) - [ ] With a dirty valid form, click an inherited parameter and confirm the Unsaved Changes dialog offers Save / Don't Save / Cancel - [ ] Choose **Cancel** and confirm the edit dialog remains open with unsaved changes retained - [ ] Choose **Don't Save** and confirm navigation proceeds and pending edits are discarded - [ ] Choose **Save**, confirm the update completes, and confirm the review actions show **Close** and **Go to Parameter** (no automatic navigation) - [ ] From the completed review, click **Go to Parameter** and confirm navigation to the inherited Parameter Context (with parameter highlight when applicable) - [ ] From the completed review, click **Close** and confirm the dialog closes without navigating - [ ] With a dirty invalid form, click an inherited parameter and confirm **Save** is disabled, messaging explains the form is not saveable, and **Don't Save** / **Cancel** behave as above - [ ] Confirm a normal Apply/Save without inherited navigation still shows only **Close** on the completed update review -- 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]
