[LayerNext 4] Migrate built-in layers and finalize the v2 public API

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
28/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
react, typescript

調査の方向性

Start by reading parent #373 and dependencies #374–#376, then inspect the v2 layer examples, React integration, migration guide, and layer authoring docs. Coordinate with #360 and #363–#367 before changing built-in canvas, HTML, combined, and resource-free layers or final exports. Done means the new model can replace the transitional API without duplicate engines, while runtime, compiler, build, lint, E2E, fixture, consumer, and cleanup checks all pass.

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

説明

Parent: #373. Status: deferred. Target branch: v2.

Dependencies: #374, #375, #376. Coordinate with #360 and #363-#367 so migrated packages retain permanent strict checks and consumer compatibility.

Goal

Validate the new authoring model on real layers while old Layer and LayerNext can coexist. Decide the final public names and retire the transitional API before stabilizing v2.

Scope

  • Migrate built-in canvas, HTML, combined and resource-free layers incrementally, including graph/selection/groups, creation/connection tools, cursor, React layers/portals, minimap and devtools.
  • Replace duplicated context declarations, old lifecycle super requirements and ambiguous main-canvas access with the new model.
  • Adapt examples and React integration so consumers can author a layer with only their own props and rendering/lifecycle hooks.
  • Preserve custom block metadata/props hints and generic custom layer constructor/instance/ref inference. Do not introduce runtime validation of application-owned metadata shapes.
  • Update the cumulative v1-to-v2 migration guide and layer authoring docs throughout the migration.
  • Review the proposed final export transition: new model becomes Layer, old Layer is removed, and LayerNext is no longer a permanent parallel API. Confirm the exact release timing/names before the removal step.

Acceptance criteria

  • Intermediate releases/PRs support mixed old/new built-ins without duplicated engines or lifecycle behavior.
  • Representative custom layers require no injected dependency props or resource context assertions.
  • Resource-free cursor, HTML portals, canvas drawing and combined devtools layers all demonstrate the new contract.
  • Runtime checks cover interaction, rendering, updates, detach/reattach and full disposal, including temporary DOM/style cleanup.
  • Source and packed fixtures preserve required prop checks, complex generic constructors and concrete React refs/methods.
  • The migration guide explains each public breaking change, and final exported names are explicit and tested.
  • Each migration PR is independently mergeable with build, lint, strict/native compiler checks, unit/E2E and installed package consumers green.

This is deferred follow-up work. It does not postpone or replace the existing strict-TypeScript migration tasks.

主要言語
TypeScript
スター
145
フォーク
12
平均マージ
1日 14時間
マージ済み PR(30日)
43

環境構築

はじめの一歩

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

gravity-ui/graph のほかの issue

gravity-ui/graph の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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