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

Abierto
#377 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
28/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
react, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
145
Forks
12
Merge medio
1 d 14 h
PR fusionados (30 d)
43

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de gravity-ui/graph

Todos los issues de gravity-ui/graph

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.