Improve background-deploy notification handling #4692
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a first iteration of improving the background conflict handling within the editor.
In Node-RED today, if another user deploys changes to the runtime whilst I have the editor open, it displays a modal notification and forces you to do something about it there and then. The choices being to merge, review or ignore the update.
If the other developer is being particular productive, they could be repeatedly deploying changes - causing this modal interruption every time.
The goal here is to remove this interruption, whilst still providing a way for a user to know there are upstream changes available for them to deal with at their time of choosing.
This PR updates the notification so that:
1. it is no longer modal - the user is not blocked from continuing what they were doing
2. it is stream-lined - single line notification to be less intrusive
3. it hides after 10s (or if clicked, as with other notifications)
4. the warning icon is shown - clicking on it reopens the notification
As part of this, I've fixed a few issues around tracking the changed/moved status of nodes across merges, as well as the undo/redo action of merging remote changes. There is still a bug with undo history going beyond a merge - but will look at separately.
Clicking the 'Review changes' button takes the user through the existing workflow - no changes in this area. This is the same dialog they see if they try deploying their changes with pending background changes.