1. IF user has placed nodes on the canvas, not saved, and takes an action such as:
Selecting new pipeline type
Loading pipeline from template
Loading pipeline from import
THEN, the 'Unsaved Changes' dialogue box appears.
Text: "Do you want to save pipeline as a draft?"
Buttons: 'Cancel,' 'Save,' and 'X')
a. If user clicks 'Save,' then the message is dismissed and the user remains on original screen.
b. If user clicks 'Don't Save,' then the pipeline is not saved as a draft and the user is taken to intended destination.
c. If user clicks 'X,' then the message is dismissed and the user remains on original screen.
This PR (https://github.com/caskdata/cdap/pull/5367) fixes all the UI to show confirmation message on all of the above cases except the last one.
While accidentally leaving hydrator++ studio view it would not be possible to show the same confirmation message as we do now but it will be a browser native confirmation popup with the same message. That change is not yet there hence not resolving the PR as of now.
Please add 'Don't Save' Button between 'Cancel' and 'Save.' Style it like 'Cancel' button in attached design.
The fix for this JIRA is as follows,
When there are unsaved changes UI shows appropriate message and prompts user with "Save" "Don't save" & "Cancel" options.
Save - Saves the pipeline and transitions. If there is no name adds a message on the console about name and prompts the user to save the pipeline after entering a name.
Don't Save - Discards changes and proceeds to the new state
Cancel - Stays on the same state.