-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: direct link to single block in library [FC-0062] #1392
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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1392 +/- ##
=======================================
Coverage 93.15% 93.15%
=======================================
Files 1051 1051
Lines 20328 20355 +27
Branches 4335 4337 +2
=======================================
+ Hits 18936 18962 +26
+ Misses 1332 1330 -2
- Partials 60 63 +3 ☔ View full report in Codecov by Sentry. |
@navinkarkera I got this error when adding a component in a library, could you check it? |
@ChrisChV Yeah, adding component is in a tricky stage. You need to checkout openedx/edx-platform#35636 first to add xblocks and then switch to my branch to test this PR. OR you can test this PR in isolation by manually pasting usageKey param to components url, for example: https://apps.local.openedx.io:2001/course-authoring/library/lib:OpenedX:CSPROB3/components?usageKey=lb%3AOpenedX%3ACSPROB3%3Ahtml%3A843b4c73-1e2d-4ced-a0ff-24e503cdb3e4 |
@navinkarkera @ChrisChV You can just copy a block from a library and paste it in to the course. Should be working fine on any recent-ish master version, and it will set up the upstream/downstream link correctly. |
@navinkarkera I don't see the warning alert, I don't know what I'm missing. Could you create a PR of upstream-warning-alert and I'll try again, or maybe @bradenmacdonald can help me test this too? |
@ChrisChV Will create a PR for edx-platform and update instructions soon. |
3010fa1
to
3b5a196
Compare
@ChrisChV The edx-platform PR is ready. The alert was not displayed for xblocks using custom tabs in edit modal, fixed it now. |
@navinkarkera I also can't get to display the alert |
@navinkarkera What XBlock are you testing with? Because it looks like you added the alert to the edx-platform side, but for the blocks we currently support in libraries (text, html, video), the editor is implemented on the MFE side and doesn't display any platform UI at all. e.g. I click Edit on a Text block and it takes me to http://apps.local.openedx.io:2001/authoring/course/course-v1:BradenX+CP200+23/editor/html/block-v1:BradenX+CP200+23+type@html+block@5579a1d881d74d34aeb0a7e68e935ec1 Edit: Ah, I see - somehow you have the new MFE editor disable for text blocks. That's not the default configuration we're going to ship for Sumac. We also don't need to support Drag and Drop because we don't currently allow them in libraries. |
@bradenmacdonald I understood the same thing: the change in the legacy UI. Since the way to add library components and synchronize them is there (copy/paste). So, we don't merge these changes? EDIT:
I see it now, I had it disabled too |
@ChrisChV I guess we could still merge this, but since we try to encourage everyone to use the MFE editors and they're on by default, it's not really solving anything for the default experience which was the main goal. For example, on our sandbox (which is essentially the default configuration for Sumac), you wouldn't even be able to test this. Default experience = legacy unit page but new MFE editors for Text/Video/Problem |
@bradenmacdonald Ok, I see it more clearly now. Thanks! |
🤦 My bad, I don't have the new MFE editors enabled. I'll quickly add this warning to the new editors as well and keep the legacy as well since we already implemented it. |
Hmm, are they not enabled by default in Tutor? If so, we need to fix that. |
Adds support for displaying single xblock in a library when passed a query param: usageKey. This is required for directing users to a specific block from course.
Displays an alert when user attempts to edit a course block imported from a library.
3b5a196
to
f64f0c2
Compare
Not sure, I might have disabled it at some point. |
Updated this PR to show warning when new editors are used for editing course blocks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
- I tested this: I tested on legacy UI and MFE with text, problem and video
- I read through the code and considered the security, stability and performance implications of the changes.
- I tested that the UI can be used with a keyboard only (tab order, keyboard controls).
- Includes tests for bugfixes and/or features added.
- Includes documentation
- Includes fixtures that create objects required for manual testing.
Description
Adds support for displaying single xblock in a library when passed a query param: usageKey. This is required for directing users to a specific block from course.
vokoscreenNG-2024-10-23_12-30-33.mp4
Supporting information
Private-ref
: FAL-3877Testing instructions
Library Content
option to add an xblock from libraries