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

Đang mở
#377 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
28/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react, typescript

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
145
Fork
12
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
43

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của gravity-ui/graph

Tất cả issue của gravity-ui/graph

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.