Skip to content

NIFI-16217 - Fix: Unsaved Parameter Context changes silently lost when navigating to an inherited Parameter Context - #11559

Open
rfellows wants to merge 1 commit into
apache:mainfrom
rfellows:NIFI-16217
Open

NIFI-16217 - Fix: Unsaved Parameter Context changes silently lost when navigating to an inherited Parameter Context#11559
rfellows wants to merge 1 commit into
apache:mainfrom
rfellows:NIFI-16217

Conversation

@rfellows

Copy link
Copy Markdown
Contributor

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

Decision flow

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
Loading

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

…n navigating to an inherited Parameter Context
@rfellows rfellows added the ui Pull requests for work relating to the user interface label Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui Pull requests for work relating to the user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant