Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

yjs-widgets does not play well with Lumino widgets

オープン
#8 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
frontend

調査の方向性

まず JupyterYWidget renderer と issue に示されている renderModel/createYWidget パスを特定し、その後、想定されている API についてコメントスレッドを確認します。ノードがどのように作成され、アタッチされるかを判断し、提案されたフローで Lumino ベースのウィジェットを構築してアタッチできることを検証します。

索引モデルが issue の本文から書いたものです。

説明

Issue

One cannot easily create a yjs-widgets based on Lumino. Because the node element that the Renderer provides is not yet attached:

class YJupyterCADWidget implements IJupyterYWidget {
  constructor(yModel: JupyterYModel, node: HTMLElement) {
    this.yModel = yModel;
    this.node = node;

    const widget = new LuminoWidget();

    // The following does not work! Because this.node is not yet attached to the DOM
    Widget.attach(widget, this.node);
  }

  yModel: JupyterYModel;
  node: HTMLElement;
}

Fix proposition

I would like to suggest modifying the JupyterYWidget to get closer to the logic we have in ipywidgets. Basically, the Widget class would be expected to have a node element that would either be a Lumino Widget:

  async renderModel(mimeModel: IRenderMime.IMimeModel): Promise<void> {
    const modelId = mimeModel.data[this._mimeType]!['model_id'];

    this._yModel = this._modelFactory.getYModel(modelId);
    if (!this._yModel) {
      return;
    }

    const widget = this._modelFactory.createYWidget(modelId);
    this.addWidget(widget.node)
  }
主要言語
TypeScript
スター
10
フォーク
10
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

QuantStack/yjs-widgets のほかの issue

QuantStack/yjs-widgets の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。