Disable uploading files while an upload is in progress
This PR disables the upload button and shows a spinner during uploads so continuing to click the upload button doesn't flood the LMS with requests.
What changed?
- Disables the Upload Files button when upload starts.
- Shows a spinner to indicate to the learner an upload is in progress.
- Toggle both when the upload finishes or fails.
Developer Checklist
- [x] Reviewed the release process
- [x] Translations and JS/SASS compiled
- [x] Bumped version number in openassessment/__init__.py and package.json
Testing Instructions
- Deploy this version of the xblock to a devstack or instance.
- Create a course and add the xblock.
- Edit the xblock settings to allow uploads.
- Go to the xblock in the LMS.
- Open the browser developer console and set throttling to 3G.
- Select a few files and click Upload files.
- Confirm the button is disabled and a spinner appears.
- Disable throttling in the developer console.
- Confirm the button is enabled again and the spinner disappears when the upload finishes.
Reviewer Checklist
Collectively, these should be completed by reviewers of this PR:
- [ ] I've done a visual code review
- [ ] I've tested the new functionality
FYI: @openedx/content-aurora
Thanks for the pull request, @viadanna!
This repository is currently maintained by @openedx/2u-aurora.
Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.
:radio_button: Get product approval
If you haven't already, check this list to see if your contribution needs to go through the product review process.
- If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
- This process (including the steps you'll need to take) is documented here.
- If it doesn't, simply proceed with the next step.
:radio_button: Provide context
To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
- Dependencies
This PR must be merged before / after / at the same time as ...
- Blockers
This PR is waiting for OEP-1234 to be accepted.
- Timeline information
This PR must be merged by XX date because ...
- Partner information
This is for a course on edx.org.
- Supporting documentation
- Relevant Open edX discussion forum threads
:radio_button: Get a green build
If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.
Where can I find more information?
If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
When can I expect my changes to be merged?
Our goal is to get community contributions seen and reviewed as efficiently as possible.
However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
- The size and impact of the changes that it introduces
- The need for product review
- Maintenance status of the parent repository
:bulb: As a result it may take up to several weeks or months to complete a review and merge your PR.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 95.29%. Comparing base (3418d7b) to head (e733351).
:warning: Report is 7 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #2237 +/- ##
=======================================
Coverage 95.29% 95.29%
=======================================
Files 195 195
Lines 21664 21664
Branches 1509 1509
=======================================
Hits 20644 20644
Misses 771 771
Partials 249 249
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 95.29% <100.00%> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@viadanna Since this is a user-facing change it will need to go through product review. You can get that process started by creating a product proposal and pinging #wg-product-core on Slack to find a coordinator (cf. docs).
CC @kaustavb12
@viadanna @kaustavb12 Once Product is done with their review, feel free to ping me for a CC review & merge.
Hey @viadanna, checking in to see if you've had a chance yet to ping #wg-product-core on Slack to find a coordinator for the product proposal (https://github.com/openedx/platform-roadmap/issues/387) for this PR?
@itsjeyd Yes, I did, but got no answer yet.
@pomegranited this is good for CC review.
@pomegranited are you able to create a new release from the tag 6.16.4 so we can bump this on master?