[LayerNext 1] Add shared hosting and typed layer authoring contracts
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
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- developer-experience, frontend
Direzione di ricerca
Start by reading prerequisite #358 and coordinate the constructor typing and React inference work in #360 and #363; inspect the existing Layer, graph registration, useLayer/GraphLayer APIs, declaration checks, and v1-to-v2 migration guide. The issue leaves the public API design open, so first settle the authoring syntax and host/adapter boundaries with maintainers. Done means the acceptance criteria pass for mixed old and new layers, source and packed declarations, current consumers, and migration documentation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Parent: #373. Status: deferred. Target branch: v2.
Prerequisite: #358. Coordinate constructor typing with #360 and React inference with #363; this task must not block the existing strict track.
Problem
Current layer props combine user data, graph/camera/root dependencies and resource configuration. Authoring a canvas layer requires repeating context types and validating fields that the base layer creates. canvas and graphCanvas can refer to different elements depending on the subclass.
Scope
- Design and introduce
LayerNextalongside the existingLayer, without subclassing the old public API. - Share an internal host/adapter mechanism for registration, scheduling and resources rather than copying the engine.
- Separate user props from runtime dependencies and resource creation options; graph root ownership is internal.
- Define typed canvas-only, HTML-only, combined and resource-free modes. Choose ergonomic syntax before implementation; the public surface should remain centered on
LayerandLayerNextduring transition. - Provide a guaranteed drawing context for canvas mode, checked when created. The new drawing hook should receive a prepared canvas without requiring manual resetTransform or super calls.
- Give own-canvas access a consistent meaning. Use the graph API explicitly for the main graph canvas in the new model.
- Make graph registration and React useLayer/GraphLayer accept both models while preserving exact props, instance and ref types. Omitted props are allowed only when no user prop is required.
Acceptance criteria
- Old and new custom layers can coexist in one graph and continue rendering correctly.
- Required/optional custom props, concrete methods/refs and generic custom classes are checked against source and packed declarations.
- Canvas resources are required only in canvas-capable modes; missing resources and null 2D context have defined behavior.
- Author code does not need a custom context assertion to access its declared resources.
- No graph/camera/root injection details appear in user props; registration retains inference without blanket constructor casts.
- Source/declaration checks and current consumers stay green; transition changes are documented in the v1-to-v2 migration guide.
The detailed API design is future work for this issue, not an already approved implementation spec. Lifecycle/disposal and reactive prop updates are tracked by the following child tasks.
- Lingua principale
- TypeScript
- Stelle
- 145
- Fork
- 12
- Merge medio
- 1g 14h
- PR unite (30g)
- 43
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di gravity-ui/graph
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
gravity-ui/graph#457 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
gravity-ui/graph#455 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
gravity-ui/graph#456 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
gravity-ui/graph#431 ·
I maintainer di solito rispondono entro 1 giorno
-
proposal
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
gravity-ui/graph#416 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di gravity-ui/graph
Issue simili
-
area:cli area:security bug priority:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
rtk-ai/rtk#5127 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
"code source" and "numerique.gouv" links: "new window" mention duplicated in the accessible nameApertaaccessibility
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
numerique-gouv/lasuite-landingpage#315 ·
I maintainer di solito rispondono entro 1 giorno
-
needs:triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
HyeokjaeChoi/vaultme#585 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement priority/P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
beettlle/pi-smart-router#200 ·