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

Aperta
#377 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
28/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
145
Fork
12
Merge medio
1g 14h
PR unite (30g)
43

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di gravity-ui/graph

Tutte le issue di gravity-ui/graph

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.