Fix "in progress" and "error" states of UpdateStatus
component
#2794
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 fixes the status indicators in network diagrams and timelines. See below for videos showing the behavior.
I think ideally, we should also implement further measures to prevent users from losing unsaved work:
Enable a read-only mode when the users browser is offline and show a more prominent, potentially blocking message. This may be slightly more complex to implement, and I’d suggest we look into this separately from this PR.
When a user tries to close the page or to navigate away while there are still unsaved changes, display a warning and ask the user to confirm. We had this behavior before, but it’s currently not possible to implement it, because React Router v6 has removed a relevant feature in v6. There is an active draft PR React Router by the projects maintainer, so it will probably be added back soon. I’d suggest we wait for that rather than working/hacking around it.
Closes #2793.
Error while saving changes:
default.mov
Saving changes on a slow internet connection:
Screen.Recording.2023-01-03.at.21.02.24.mov
Browser is offline:
Screen.Recording.2023-01-04.at.16.31.35.mov