Skip to content
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

[DRAFT] docs: FC-0010 ADR for restructuring video block and integrating React and Video.js #33671

Closed

Conversation

GlugovGrGlib
Copy link
Member

Description

This ADR is introducing the way current video block should be restructured into a separate repository and the include a new Video Player implemented using React.js and Video.js libraries.

Supporting information

Approach Memo
New Video player architecture NFR

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 7, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @GlugovGrGlib! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@GlugovGrGlib GlugovGrGlib force-pushed the rg/fc-0010/video-block-adr branch 3 times, most recently from 9c79f63 to 378c85c Compare November 7, 2023 16:03
@GlugovGrGlib GlugovGrGlib changed the title docs: FC-0010 ADR for restructuring video block and integrating React and Video.js [DRAFT] docs: FC-0010 ADR for restructuring video block and integrating React and Video.js Nov 7, 2023
@GlugovGrGlib GlugovGrGlib force-pushed the rg/fc-0010/video-block-adr branch 2 times, most recently from b28152b to 585fcad Compare November 7, 2023 16:25
@GlugovGrGlib GlugovGrGlib force-pushed the rg/fc-0010/video-block-adr branch from 74d3a06 to efa254f Compare November 7, 2023 16:31
@GlugovGrGlib GlugovGrGlib force-pushed the rg/fc-0010/video-block-adr branch from efa254f to 25e1c4a Compare November 7, 2023 16:35
Copy link
Contributor

@ormsbee ormsbee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this ADR! I've got a number of questions, mostly around the rollout strategy and Studio-related work.

.. image:: ./Architecture.png

2. **React.js and Video.js Integration**
* React.js will be used to build a responsive, accessible frontend for a new Xblock as proposed in https://github.com/openedx/XBlock/issues/635 and prototyped in https://github.com/openedx/XBlock/issues/634.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* React.js will be used to build a responsive, accessible frontend for a new Xblock as proposed in https://github.com/openedx/XBlock/issues/635 and prototyped in https://github.com/openedx/XBlock/issues/634.
* React.js will be used to build a responsive, accessible frontend for a new XBlock as proposed in https://github.com/openedx/XBlock/issues/635 and prototyped in https://github.com/openedx/XBlock/issues/634.

Comment on lines 51 to 52
* The new XBlock will be embedded in iframes in the legacy interface.
* In the Course Authoring MFE, the XBlock will be integrated natively using React.js components.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any precedent from other XBlocks for what you're doing here? If so, please cite. This seems like an area that could add a lot of complexity.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe ORA2 team is doing something pretty similar, I will investigate and provide more info on this ADR.

Besides this, the approach suggested by @kdmccormick in openedx/XBlock#634 is compatible with this decision. However, it also differs in the area of where to render the required front-end in the LMS, whether inside or outside of the iframe.
Eventually, the ReactJS component will be packaged in an NPM package, awaiting props to render the Video Player. These props can be passed to the component either from the VideoBlock backend or directly from the new Course/Library Authoring editors.

I will note this in ADR

Comment on lines 55 to 56
* The data migration will not be required as long as the current video block backend is used.
* Data and metadata will be preserved during the migration.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any old/obscure/deprecated features of the existing VideoBlock that won't make the transition?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From https://openedx.atlassian.net/wiki/spaces/OEPM/pages/3674734593/Approach+Memo+Technical+Discovery+React-based+Video+Player#Technical-Requirements we do have an item:

Discovery will need to be done on what fields currently exist in the XBlock, and as much as possible should go through the Deprecation process before beginning the process of migrating any over

Such as the multi-speed YouTube upload option, which we used in 2012 before YT started generating multiple speeds for you. Open questions: Is anyone using video bumpers? What features weren’t ported to the MFE, or are no longer exposed in the UI? etc

* An NPM package will be created for the frontend, and it will be versioned and published (`Issue 635 <https://github.com/openedx/XBlock/issues/635>`_).

3. **Feature Toggle in edx-platform**
* A feature toggle will be introduced using Django Waffle flags.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the implementation strategy is to move all the code out of the edx-platform repo, what would the feature toggle do? Is it purely the frontend rendering that's being toggled?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the migration strategy is purely frontend focused, e.g. the VideoBlock decides which way to render based on feature toggle, then I think that's fine, and extracting the code into a new repo before active development makes perfect sense. Then rollout could be done by course because the VideoBlock would always have the course context when deciding which version of its UI to render. Was that the idea?

If that's the case, and if the VideoBlock is going to keep around both sets of frontend assets, would it be lower effort to keep something closer to the old Studio experience for now, instead of the iframe editor there? Or at least, would it be practical to put off Studio changes until late in the process?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct, the feature toggle will be used to switch between legacy and new UI.
I will add the decision that user has an option for using either legacy editor or new editor in studio as it's already implemented now

@sarina
Copy link
Contributor

sarina commented Nov 14, 2023

For people reviewing this ADR (@ormsbee @arbrandes and others) could you also review the high level implementation plan? https://openedx.atlassian.net/wiki/spaces/OEPM/pages/3864428545/DRAFT+Video+Player+implementation+backlog

@GlugovGrGlib GlugovGrGlib force-pushed the rg/fc-0010/video-block-adr branch from d7692c0 to dd659b3 Compare November 15, 2023 21:57
@GlugovGrGlib
Copy link
Member Author

This ADR is on pause due to postponing FC-0010, this PR will be closed and can be reopened or used for the references during following work on the React-based video player

Pause notes: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/3951919121/Pause+notes+of+the+React-based+video+player+integration

@openedx-webhooks
Copy link

@GlugovGrGlib Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants