feat: adds Library Content button to Studio Unit page [FC-0062] - #35670
Conversation
|
Thanks for the pull request, @navinkarkera! What's next?Please work through the following steps to get your changes 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. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by 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:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
b6a8793 to
643bce7
Compare
|
|
||
| duplicateComponent: function(xblockElement) { | ||
| // A placeholder element is created in the correct location for the duplicate xblock | ||
| // and then onNewXBlock will replace it with a rendering of the xblock. Note that |
There was a problem hiding this comment.
This file has many duplicate functions like deleteXBlock, duplicateXBlock, showMoveXBlockModal etc.
| :library_content_key: the key of the library content to add. (Incompatible with | ||
| all other fields except parent_locator) |
There was a problem hiding this comment.
Having this POST arg will be nice, so that we don't have to follow up the request with a PUT 👍🏻
There was a problem hiding this comment.
@kdmccormick Yes, called upstream sync after creating the block in a single call, simplified the js part. bc27ba3
iframes the Authoring MFE's Library Content Picker
Removes need to call a follow up PUT request
ddd1307 to
bc27ba3
Compare
navinkarkera
left a comment
There was a problem hiding this comment.
It seems like upstream sync will only support blocks that were published. Currently the component picker shows all components including drafts that were never published.
|
|
||
| initializePasteButton() { | ||
| if (this.options.canEdit && !self.options.isIframeEmbed) { | ||
| if (this.options.canEdit && !this.options.isIframeEmbed) { |
| // Do not perform any changes on paste button since they are not | ||
| // rendered on Library or LibraryContent pages | ||
| if (!this.isLibraryPage && !this.isLibraryContentPage && !self.options.isIframeEmbed) { | ||
| if (!this.isLibraryPage && !this.isLibraryContentPage && !this.options.isIframeEmbed) { |
We have a separate story for that which @ChrisChV is working on: openedx/frontend-app-authoring#1354 / https://tasks.opencraft.com/browse/FAL-3881 |
|
I also have a draft "published" filter but it turns out to need some backend changes to implement and I haven't had time. CC @ChrisChV . openedx/frontend-app-authoring#1406 |
bradenmacdonald
left a comment
There was a problem hiding this comment.
Nice! It's working well. Here are some minor things I've noted that we should clean up:
| * Adds the action buttons to the modal. | ||
| */ | ||
| addActionButtons: function() { | ||
| this.addActionButton('cancel', gettext('Cancel')); |
There was a problem hiding this comment.
This can be fixed in a fast-follow PR (because I'm eager to get this into testing ASAP), but it's not a great UX that the "Next" button is sometimes hidden until you scroll, and the Next + Cancel buttons are in totally different places. I think they need to either be both inside the modal or both in the legy UI actions bar.

There was a problem hiding this comment.
Actually, do we even need a Next button? Selecting a course should directly take to next page since we only have one item to select in the first slide.
There was a problem hiding this comment.
Removed next button and updated it to go to component selection on library selection.
vokoscreenNG-2024-10-21_11-16-03.mp4
There was a problem hiding this comment.
Makes sense to me!
|
@navinkarkera Oh, actually one more important thing: can you make sure this new button is only |
|
@bradenmacdonald Thanks for the suggestions, updated and addressed all your comments. |
bradenmacdonald
left a comment
There was a problem hiding this comment.
Great work @navinkarkera ! I tested this with the latest course-authoring PR and it's working well. Ready to merge.
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
|
2U Release Notice: This PR has been deployed to the edX production environment. |
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
|
2U Release Notice: This PR has been deployed to the edX production environment. |
…5670) Requires that v2 libraries are enabled.
Built on top of: open-craft#699 and #35636
Depends on
First iteration
vokoscreenNG-2024-10-18_17-57-00.mp4
Second iteration
vokoscreenNG-2024-10-21_11-16-03.mp4
Test instructions:
tutor dev exec lms openedx-assets build --env=devto rebuild JS files