Implement the not-uploaded overlay and re-upload click event for Captures #321
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.
Enhancements
Change data flow to allow undefined asset so that upload failure doesn't prevent the view from updating.
Display semi-transparent white overlay and error icon when upload fails. Clicking the overlay triggers re-uploading.
Display uploading spinner when re-uploading.
Limitations
The user can only re-upload 1 photo at a time. During the upload, tapping the other upload-error photos does nothing.
When uploading the photo in the normal flow, the user would see the upload error first (after the proof is added to the repository but before the asset is added to the repository)
It seems to me that trying to remove these limitations without adding a persistent upload state for Proof would make the component data flow very dirty. Feature-wise I believe the current limitation is acceptable so maybe we could improve it later, but if there's any quick way to improve the implementation or remove the limitations I'd be glad to hear it and make change accordingly.