Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mobile Stories block (part 4): error handling (#17458)
* Revert "Revert "added new component StoryUpdateProgress", not belonging to this branch" This reverts commit 34349b1. * added mediaSave statuses listeners definitions * moved StoryEdit to a React.Component class and implemented StoryUpdateProgress overlay * added onStorySaveResult handling to Story block * edit mode: replacing urls by id for saving process * added onMediaModelCreated() callback so we can re-assign the mediaID to the mediaFiles attribute of a Story block once such a mediaModel is created * update the mediaFile id and URL of a given story frame when finished uploading succesfully * removed commented imports * added explicit TODO comments to make sure to follow up on them for error handling * make sure to call mediaUploadSync and storySaveSync if any of the mediaFiles contained in this block is not a remote url - also call onRemoveBlockCheckUpload() action under the same conditions in componentWillUnmount() * using BlockMediaUpdateProgress * method rename * updated story block to represent error state * added cancel and retry bridge methods specific for mediaFiles collection based blocks * using a deep copy of mediaFiles when replacing ids and mediaUrl, given mediaFiles attribute needs to be replaced again and cannot be modified in place as per React conventions * added requestMediaFilesSaveCancelDialog bridge method * changed props name onMediaModelCreated to more generic onMediaIdChanged * removed commented code * replaced for loops with map
- Loading branch information