feat: plugin slots for video and file upload components and alerts#1523
feat: plugin slots for video and file upload components and alerts#1523bradenmacdonald merged 1 commit intomasterfrom
Conversation
|
Thanks for the pull request, @xitij2000! This repository is currently maintained by 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. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo 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:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere 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:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
d1a51a4 to
694edb1
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1523 +/- ##
==========================================
+ Coverage 94.73% 94.75% +0.02%
==========================================
Files 1206 1225 +19
Lines 27014 27375 +361
Branches 6066 6166 +100
==========================================
+ Hits 25592 25940 +348
- Misses 1351 1364 +13
Partials 71 71 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4e9d9df to
9c79a41
Compare
|
@xitij2000 is this still in progress? |
Yes, I realise I forgot to commit and push the docs here. Will do that shortly and then it's ready for review. |
9c79a41 to
efafa3c
Compare
efafa3c to
b42f8bc
Compare
b42f8bc to
bedef36
Compare
bedef36 to
abb9a6f
Compare
|
Hi @xitij2000 - can we close this, or is it still needed? |
I will update it asap. It is still needed. |
d709e67 to
7769d81
Compare
|
@xitij2000 You can ping me for a review when ready. |
|
@bradenmacdonald This is ready for review. |
| currentData: uploadingIdsRef.current.uploadData, | ||
| originalValue: { name, progress }, | ||
| key: `video_${idx}`, | ||
| edxVideoId: undefined, |
There was a problem hiding this comment.
Set this to undefined to make TS happy, since it's expected by the function.
| const handleDownloadFile = (selectedRows) => dispatch(fetchVideoDownload({ selectedRows, courseId })); | ||
| const handleUsagePaths = (video) => dispatch(getUsagePaths({ video, courseId })); | ||
| const handleFileOrder = ({ newFileIdOrder, sortType }) => { | ||
| dispatch(updateVideoOrder(courseId, newFileIdOrder, sortType)); |
There was a problem hiding this comment.
While there is a sortType param here, the updateVideoOrder function doesn't seem to take this param, so it's passed pointlessly.
7769d81 to
994468d
Compare
bradenmacdonald
left a comment
There was a problem hiding this comment.
@xitij2000 so sorry for the delay. I think this looks good; just needs some updates to the READMEs. Could you please make those fixes and rebase this, then I can merge it?
33c0789 to
40b9ec7
Compare
|
Thanks for those changes. There's a new test failure to fix. |
734b4c9 to
f0461f1
Compare
Fixed! |
bradenmacdonald
left a comment
There was a problem hiding this comment.
OK, I still think it would make more sense to have separate slots for the videos and files page, but this is good with me.
|
@bradenmacdonald I can make that change, it will just need some minor refactoring. |
|
OK, I think that would be a good idea. Then I'm happy to merge this. |
I've split the slots and also renamed them. I've removed 'error' from their name since they can be used for other kinds of alerts as well. |
|
@xitij2000 I think you forgot to push that change? I don't see any new commits, and I still see the combined slot. |
This change add plugin slots for the file and video upload components, and the alerts components on those pages.
e48366d to
f2825e9
Compare
Odd, I think the push failed, I've pushed again with all fixes. |
bradenmacdonald
left a comment
There was a problem hiding this comment.
Thanks for those changes, and for refactoring the plugins to TypeScript.
|
@xitij2000 @bradenmacdonald Just to confirm, will this PR work without the changes from openedx/openedx-platform#35895 (which are currently in product review)? |
|
@itsjeyd Yes, those changes are required for the plugins that are intended to go in these slots, but not for the slots themselves. |
Description
This change adds plugin slots for the file and video upload pages to allow developers to customise those components. It also adds empty slots allowing developers to add additional alerts.
Supporting information
NA
Testing instructions
TBD
Other information
This change is being made to support a feature where a client wants course authors to acknowledge fair use terms before they are allowed to upload files
Private-ref: https://tasks.opencraft.com/browse/BB-9330