[LayerNext 3] Make layer prop and presentation updates predictable
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
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
Start by reading the LayerNext implementation, the useLayer React integration, and the related strict-readiness work in #364 and #365. Identify how constructor resources, presentation props, graph/layer replacement, attach/detach cleanup, and consumer fixtures are structured before choosing signatures or reset semantics. Done means supported updates affect the existing live layer without resource recreation or duplicate subscriptions, immutable options are rejected or clearly unsupported, and source, packed consumer, runtime, and migration checks cover the stated lifecycle cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Parent: #373. Status: deferred. Target branch: v2.
Dependencies: #374, #375. Coordinate addon defaults with #364 and #365; do not duplicate their strict-readiness work.
Problem
A layer can receive setProps updates, but resources created in its constructor do not automatically reflect new classes, zIndex or dimensions. Some addons capture values only during construction. User props and Canvas creation options share an object even though their update capabilities differ.
Scope
- Define a typed public updateProps(patch) operation for LayerNext that updates the existing instance.
- Separate mutable user/presentation props from immutable resource creation options, such as 2D context attributes. Document unsupported mutations explicitly instead of silently ignoring them.
- Define defaults, omitted/undefined values, object/array replacement and reset semantics before implementation. Reuse the established v2 settings policy where appropriate; do not invent a separate reset API without a demonstrated need.
- Normalize defaulted values into complete runtime values while keeping consumer input partial/optional where appropriate.
- Apply supported common presentation updates to the actual DOM/canvas and schedule redraws. Preserve declared resources and listeners during ordinary prop updates.
- Ensure React useLayer updates the current live layer without recreating it or sending updates to a disposed/replaced instance.
Acceptance criteria
- Source and packed consumer fixtures reject invalid patch keys/values and preserve custom generic prop inference.
- Updating one prop preserves unrelated defaults and values; omitted and undefined values follow the documented policy.
- Supported class/zIndex/size changes affect the existing elements and rendering, with no duplicated subscriptions or resource recreation.
- Immutable creation options cannot appear to succeed while leaving the original resource unchanged.
- React updates follow the active instance across graph/layer replacement and cleanup.
- Runtime and consumer checks cover updates before attach, while attached and after detach; migration docs and strict checks remain current.
The exact update/reset signatures and list of mutable common options are design decisions for this future issue.
- 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 ·