Prototype: React-enabled XBlocks
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 18/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python, react
- 領域
- api, backend, documentation, frontend
調査の方向性
親 issue 635 と、issue でリンクされている XBlock student_view_data の例から始めます。次に、lms/djangoapps/mfe_config、Learning MFE の courseware パス、およびここで説明されている XBlock の React-enabled フィールドを調査します。完了条件は、指定されたブランチ全体で動作するプロトタイプがあり、XBlock の型とビュー全体に React ビューを一般化するための推奨案があることです。
索引モデルが issue の本文から書いたものです。
説明
Background
See https://github.com/openedx/XBlock/issues/635
Goals
- On branches of edx-platform, frontend-app-learning, and any existing xblock:
- Add a React-based student view to the XBlock.
- Get it to render in the Learning MFE.
- Write up a recommendation for how this could be generalized for all XBlocks & all views (student, public, author, and studio) and implemented.
Suggested approach
Here's how I would do it, but that doesn't mean it's the only way it could be done!
Choose an XBlock, ideally one of the ones that is defined in its own respository. Make these changes:
- Add a
student_view_datamethod, which will return a JSON representation of the block's student view. Example that exists in master today (it was used by alternative block frontends for the LabXChange project). - In the same repo, create an NPM package containing a new student view as a React component named
StudentView. The student_view_data should be expected to be passed in via the component's props. - Publish the NPM package to a user account.
- Add a new class-level field to the XBlock:
whereclass SomeBlock(XBlock): react_views = "someblock/path/to/view/module.js""path/to/view/module.js"is replaced by a path that the Learning MFE can dynamicallyimport(...)in order to load this block'sStudentViewcomponent.
In edx-platform:
- Enhance the MFE Configuration API (defined in lms/djangoapps/mfe_config) to also return a dictionary of all "React-enabled" XBlocks, mapping from the XBlock tag to the React module path:
{
"someblock": "someblock/path/to/view/module.js"
...
}
This will allow the Learning MFE to dynamically discover the full list of React-enabled blocks.
In the Learning MFE:
- Install the new NPM package.
- Upon initialization, look at the list of React-enabled XBlocks returned by the MFE Config API. Load the
StudentViewof each block. - In courseware, if a unit is comprised entirely of React-enabled blocks, then render each block's
StudentViewcomponent instead of rendering the standard iframe to edx-platform.
Notes
See parent issue for more ideas and discussion.
- 主要言語
- Python
- スター
- 470
- フォーク
- 231
- 平均マージ
- 2日 14時間
- マージ済み PR(30日)
- 7
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openedx/XBlock のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
performance
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
[DEPR]: Support for XBlock Runtimes with raw string scope IDs対応中かも @salman2013 が 211 日前に担当しました。 オープンdepr
似ている issue
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
ansys/pydpf-core#3547 ·
メンテナーはふだん 1 日以内に返信
-
core
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
vectorize-io/hindsight#5457 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: LangChain drops OpenAI Responses text blocks from session recording対応中かも @ktz03 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
volcengine/OpenViking#5806 ·
メンテナーはふだん 1 日以内に返信
-
HTML: <template> content is extracted as document text対応中かも @ryanmeowy が今日担当しました。 オープンbug html
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
docling-project/docling#4714 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
APIv2 event data accepts a non-string reply and a NaN upper_bound対応中かも @awss1i が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
freedomofpress/securedrop#7946 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信