Open kdmccormick opened 1 year ago
Here's a good summary of V2 editors atm: https://github.com/openedx/frontend-lib-content-components/blob/main/docs/decisions/0003-V2-Content-Editors.rst
@muselesscreator, in view of our recent discussions around how to get React into XBlocks, I feel it's time to get back into this particular conversation. Since you're the current "man on the ground" trying to find a way to do it, I'd love your take on possible ways to make it happen without compromising architecture or UX.
Goal
Full completion would mean:
Non-goals:
Prior Work
Enhanced editors for Text, Video, and Problem
https://github.com/openedx/frontend-lib-content-components/blob/main/docs/decisions/0003-V2-Content-Editors.rst
Hackathon: React HTML block student view
Hackathon: React HTML block student view
We (@nsprenkle & @muselesscreator) worked on a proof of concept during a hackaton project. Note that the actual APIs we are calling are probably not the way we want to do this and we also dangerously set inner HTML of a block on the page, but the valuable bit here is we played with having multiple types of render logic from the Learning MFE,
Source: https://github.com/openedx/frontend-app-learning/tree/bw/hackathon
The TL;DR of how we think this should work:
edx-platform
XBlocks to the Learning MFE. Others could be installed the way we install other frontend components (e.g. Header / Footer)xblock.json_handler
functionality. An option is to use thestudent_view_data
paradigm used in some other environments (e.g. mobile app).iframes
to render the individual/grouped blocks HTML.Note that this should also probably be configurable per-course as some hacky (but desired by course staff) behavior could be lost with this new pattern.
Other things we learned
iframe
ing old-style HTML XBlocks while we implement frontends for the more common components.iframe
sandbox is both a blessing and a curse. This adds security and separation from the course material and our course chrome but doesn't give us access to that course content from the Learning MFE, blocking features like context-aware annotations.iframe
performance overhead that gets progressively worse for multipleiframe
s on a page. Suggestion was to think of a rendering scheme that defers to old style unit rendering if there would be too many iframes rendered to the page.Considerations & Open Questions
Tasks