-
Notifications
You must be signed in to change notification settings - Fork 80
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: [FC-0070] render iframe with xblocks #1375
feat: [FC-0070] render iframe with xblocks #1375
Conversation
Thanks for the pull request, @PKulkoRaccoonGang! 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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1375 +/- ##
==========================================
- Coverage 93.27% 92.95% -0.33%
==========================================
Files 1052 1048 -4
Lines 20503 20379 -124
Branches 4312 4364 +52
==========================================
- Hits 19125 18944 -181
- Misses 1318 1371 +53
- Partials 60 64 +4 ☔ View full report in Codecov by Sentry. |
Sandbox deployment successful 🚀 |
Sandbox deployment failed 💥 |
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
18bea34
to
d4abc74
Compare
Sandbox deployment successful 🚀 |
d4abc74
to
aa96f1a
Compare
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
aa96f1a
to
ec7cdce
Compare
Sandbox deployment successful 🚀 |
@PKulkoRaccoonGang, before I dive in, is this the only backend PR this depends on? |
@arbrandes the key task of this PR is to display the iframe on the course unit page. Previously, a PR with a template and some styles for displaying xblocks was already merged into the edx-platform. The platform branch that is currently specified for sandbox deployment is needed exclusively for some styles that I fixed while working on the following tasks. |
refactor: added some tests
ec7cdce
to
eb5847e
Compare
[inform]: Changes related to editing functionality will be added in the following PRs. |
Sandbox deployment successful 🚀 |
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.
I know there are upcoming editing changes, but noted that if I click edit and the block is down the page, somewhat, then the page won't scroll up to show the editor.
Other than that, the code looks good and it works as well as it sets out to. Approved!
* | ||
* This hook depends on the unit id just to make sure it re-evaluates whenever the ID changes. If | ||
* we change whether or not the Unit component is re-mounted when the unit ID changes, this may | ||
* become important, as this hook will otherwise only evaluate the useLayoutEffect once. |
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.
Nice write-up. Thank you for the explanation!
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.
(Also, this kind of thing is precisely why I continue to distrust iframes. But that's an entirely different discussion.)
@@ -0,0 +1,2 @@ | |||
// eslint-disable-next-line import/prefer-default-export |
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.
Once this merges we should be able to bump frontend-build and get rid of lines like this.
I'm merging based on the assumption that there will be some improvements later on. Off the top of my head:
|
Hi @PKulkoRaccoonGang! Thanks! |
@rpenido @PKulkoRaccoonGang the new unit page is working for me so long as I run your branch from draft PR openedx/edx-platform#35777 Should that have been marked as a dependency of this PR, and merged before this one? CC @arbrandes |
@pomegranited @rpenido It seems to work for me even without openedx/edx-platform#35777 but the iframe height is stuck at 220px. |
@rpenido @pomegranited @navinkarkera Thanks for letting me know! I’m currently trying to reproduce this issue on the master platform and authoring, but so far without success. Could you provide more context on the issue you found? You could also try running [update]: The infinite loading issue may be related to the Made a separate PR to fix this issue. |
@PKulkoRaccoonGang It works fine for me in Brave (chromium based browser) but not in firefox. The height is not adjusted and I can see below error in console:
|
Hi @navinkarkera! The height adjustment is working for me in Firefox. |
Settings
Description
This PR refactors the
CourseUnit
component by removing theDraggableList
andCourseXBlock
components and replacing them with a simplerXBlockContainerIframe
. Additionally, it introduces new constants for iframe handling.Testing instructions
Other information
The primary goal of this PR is to add an iframe for displaying XBlock content. Future changes will focus on enhancing the user experience and improving the interaction between actions passed from the React application to the Backbone framework.