stable
Clone or download
Part of story #12404 download folder as zip Instead of hiding the entire hierarchy and leaving people unable to continue their work (previous error handling), this contribution adds a "global" error modal. It is "global" because there is already an "error modal" state. It opens a modal that shows a generic error message and has an anchor to show the error's details to a user. In our case, it will be the http error code and message. We use the exact same pattern in Taskboard. How to test: - after loading the document tree, simulate an error in DocmanItemsResource.php (throw a RestException) - alternatively, simulate being offline in your browser dev tools. - When you click on "Download as a zip", you should see the error modal pop up. Change-Id: I8eb0115d3c2d8f1e50704df0e52b821d37af7359
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/document/scripts/document/components/App.vue | +4 | −0 | Go to diff View file |
A | plugins/document/scripts/document/components/Folder/Error/GlobalErrorModal.test.js | +103 | −0 | Go to diff View file |
A | plugins/document/scripts/document/components/Folder/Error/GlobalErrorModal.vue | +108 | −0 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/Error/ShowErrorDetails.vue | +1 | −1 | Go to diff View file |
M | plugins/document/scripts/document/po/fr.po | +5 | −3 | Go to diff View file |
M | plugins/document/scripts/document/store/actions.js | +1 | −1 | Go to diff View file |
A | plugins/document/scripts/document/store/error/error-actions.js | +27 | −0 | Go to diff View file |
A | plugins/document/scripts/document/store/error/error-actions.test.js | +60 | −0 | Go to diff View file |
M | plugins/document/scripts/document/store/error/error-mutations.js | +15 | −19 | Go to diff View file |
M | plugins/document/scripts/document/store/error/error-mutations.test.js | +30 | −0 | Go to diff View file |
M | plugins/document/scripts/document/store/error/module.js | +4 | −0 | Go to diff View file |
M | plugins/document/themes/BurningParrot/document/_document.scss | +4 | −0 | Go to diff View file |