Closed robertknight closed 2 weeks ago
This change does affect the appearance of some other errors, which can occur despite the content having loaded, such as errors related to setting up groups:
Note here that the error is not dismissible, because although the content did load, the user cannot annotate.
This is a revised version of https://github.com/hypothesis/lms/pull/6289, to improve how grading submission errors are handled in the frontend. In addition to addressing the TODOs in that draft, I have also tweaked the wording in the error messages to try and make it a bit shorter. I also used the term "Dismiss" rather than "Close" on the button to make it clearer that it is going to dismiss just the error message rather than "close" the whole assignment.
Summary of changes:
Handle the
canvas_submission_course_not_available
error with a dedicated message and revise the wording of the existing submission error.Continue to show the assignment content underneath the submission error. The error dialog already had a translucent modal backdrop, so all that was required was to move the error dialog above the content in the stacking order, and avoid hiding the content if an error occurs after it has been loaded.
Allow the user to dismiss submission errors, so they can continue making annotations. The option to dismiss the error is rendered as a secondary "Dismiss" action, to reduce the chances of the user dismissing it without reading the dialog.
With the testing diff from https://github.com/hypothesis/lms/pull/6289 applied, creating an annotation will fail with an error that looks like this: