[LayerNext 3] Make layer prop and presentation updates predictable
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 145
- フォーク
- 12
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 43
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
gravity-ui/graph のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
gravity-ui/graph#457 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
gravity-ui/graph#455 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
gravity-ui/graph#456 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
gravity-ui/graph#431 ·
メンテナーはふだん 1 日以内に返信
-
proposal
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
gravity-ui/graph#416 ·
メンテナーはふだん 1 日以内に返信
gravity-ui/graph の issue をすべて見る
似ている issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
openclaw/openclaw#199885 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
feature needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BoardGamesEmpire/board-games-empire-backend#1306 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
sequant-io/sequant#1689 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100