Repository navigation
Don't quit or replace the annotations after an incomplete export - #236
Merged
Merged
Conversation
Quitting, opening another folder and an import that replaces the annotations wait for the export the user chose to save first. They ran even if some files couldn't be written, which discarded those annotations. Now they only run once everything was saved; otherwise the error report is shown, the annotations stay unsaved and the user can export again. Reloading a folder that changed on disk still runs in any case.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #236 +/- ##
=========================================
Coverage 90.49% 90.50%
- Complexity 2408 2410 +2
=========================================
Files 142 142
Lines 9019 9023 +4
Branches 862 862
=========================================
+ Hits 8162 8166 +4
Misses 445 445
Partials 412 412 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Quitting, opening another folder, and an import that replaces the current annotations all offer to save first. After that export, the action ran even if some files couldn't be written: the error report appeared, and the app quit (or replaced the annotations) right after, so the annotations that weren't saved were lost.
Now
saveWithFormatChoiceAndRunOnSaveSuccess): these run only once everything was saved. After an incomplete export, the error report is shown, the annotations stay unsaved (red status dot), and the user can export again.saveWithFormatChoiceAndRunInAnyCase): still runs in any case, because the folder has already changed.AnnotationIoControllermarks these operations with a smallRunInAnyCasewrapper, whichonExportFinishedchecks.Tests (
AnnotationIoControllerTest)