Skip to content

Comments

Add some more error handling and logging to the image upload#2176

Merged
MisRob merged 1 commit intolearningequality:developfrom
MisRob:image-upload-logging
Sep 2, 2020
Merged

Add some more error handling and logging to the image upload#2176
MisRob merged 1 commit intolearningequality:developfrom
MisRob:image-upload-logging

Conversation

@MisRob
Copy link
Member

@MisRob MisRob commented Sep 2, 2020

Description

I've discovered several places where some more information would be useful for debugging purposes while documenting image uploading. I assume that we'll implement some UX to display errors and upload progress but for now I added at least some logging. I am going to open follow-up issues and link them here soon.

@MisRob MisRob added this to the Vue Refactor milestone Sep 2, 2020
@MisRob MisRob requested a review from jayoshih September 2, 2020 12:19
@codecov
Copy link

codecov bot commented Sep 2, 2020

Codecov Report

Merging #2176 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2176   +/-   ##
========================================
  Coverage    80.64%   80.64%           
========================================
  Files          288      288           
  Lines        14035    14035           
========================================
  Hits         11318    11318           
  Misses        2717     2717           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f20954...dc4a3fd. Read the comment docs.

@@ -159,6 +159,19 @@
this.initImageFields();
}
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those two new watchers are related to a situation when a new file is dropped to the editor area (when uploading an image using the image upload menu, progress and errors will be displayed - I haven't checked yet but can see that implementation is there)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up issue #2177

'file.progress'(progress) {
if (progress === 0) {
// eslint-disable-next-line
console.log('The image upload has started');
Copy link
Contributor

@jayoshih jayoshih Sep 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably good to remove this later, but makes sense to have it in the short term. Ideally, there would be a progress bar somewhere to show uploading in progress

},
'file.error'() {
// eslint-disable-next-line
console.error('The image could not be uploaded');
Copy link
Contributor

@jayoshih jayoshih Sep 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be a snackbar instead of a console error. Something like "Upload failed. Please try again."

@MisRob
Copy link
Member Author

MisRob commented Sep 2, 2020

Thanks Jordan, yes it's just temporary to have something before we address the follow-up issue #2177. I will link those lines to that issue to be sure that it'll be removed as soon as we have the implementation.

@MisRob MisRob merged commit 57097fb into learningequality:develop Sep 2, 2020
@MisRob
Copy link
Member Author

MisRob commented Sep 2, 2020

@jayoshih Here is updated #2177

@MisRob MisRob deleted the image-upload-logging branch November 3, 2020 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants