SF-3835 Do not allow uploading training data when offline#3985
SF-3835 Do not allow uploading training data when offline#3985pmachapman wants to merge 1 commit into
Conversation
|
📸 Screenshot diff deployed! (1 change) View the visual diff at: https://pr-3985--sf-screenshot-diffs.netlify.app |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3985 +/- ##
=======================================
Coverage 81.02% 81.03%
=======================================
Files 644 644
Lines 41445 41450 +5
Branches 6726 6751 +25
=======================================
+ Hits 33580 33587 +7
+ Misses 6770 6768 -2
Partials 1095 1095 ☔ View full report in Codecov by Harness. |
Nateowami
left a comment
There was a problem hiding this comment.
Rather than changing the error message, I took the same approach as the chapter audio dialog and disabled uploading when offline
The problem is: All errors when uploading a file (regardless of cause; they could be network related, bad file, or something else) are attributed to a malformed file, and the user is shown this message:
Your file needs to have two columns, and every row must have a value in both columns. Please fill in any empty cells and try again.
The error message should be shown only when a specific error code (could be HTTP status code, or something returned via JSONRPC) indicates a problem with the file, and the error message should contemplate the same breadth of potential problem as the code that triggers it (for example, I don't know what happens when you upload an unsupported file type, but if it can trigger the message, then the message should specify to check that the file type is one of the supported types). Disabling upload when we know we're offline doesn't stop network errors from occurring; it only reduces their frequency.
Also, we generally avoid disabling buttons, except when a feature is unavailable due to the user being offline, and then only disabling them in the context where we would show a message saying the user is offline. So in general it would be better to let the user open the upload dialog, but show a message about the user being offline inside the dialog.
@Nateowami made 1 comment.
Reviewable status: 0 of 7 files reviewed, all discussions resolved.
Rather than changing the error message, I took the same approach as the chapter audio dialog and disabled uploading when offline
This change is