[LayerNext 2] Define attachment scopes and permanent layer disposal
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
Start by reviewing graph.detachLayer(), React effect cleanup for both supported layer models, and the minimap's injected-style pattern. Trace attachment lifecycle handling across the graph, component construction, ports, subscriptions, and scheduled work before settling the public hook and cleanup-registration API. Done means attach/detach/reattach/disposal behavior is defined, all listed resources are released exactly once, StrictMode cleanup is leak-free, migration docs are updated, and existing consumer, strict, and CI checks pass.
索引モデルが issue の本文から書いたものです。
説明
Parent: #373. Status: deferred. Target branch: v2.
Dependency: #374.
Problem
The current graph.detachLayer() unregisters a layer and removes its DOM, but does not call the component's final unmount. React useLayer invokes this path on effect cleanup. The author-facing afterInit hook runs on every attachment, requires remembering base-hook calls, and cleanup of arbitrary DOM/style resources and scheduled work is easy to miss.
Scope
- Give LayerNext explicit attach, reversible detach/reattach and permanent disposal semantics.
- Invoke author hooks after derived construction is complete; do not call overridable initialization hooks from the base constructor.
- Supply an attached hook context with a guaranteed root and valid declared resources. The engine manages its internal setup without requiring user super calls.
- Allow attachment hooks to return/register cleanup for graph/DOM/signal subscriptions, temporary elements/styles and scheduled work. Run attach-scoped cleanup before reattachment and final disposal.
- Add an explicit full-removal operation such as graph.removeLayer(layer): unregister, detach and dispose the component tree and instance-lifetime resources once. Retain a distinct temporary detach path.
- Use full removal in React effect cleanup for both supported models, including StrictMode and rapid graph/layer replacement.
Acceptance criteria
- Creation before graph attachment, attach/detach/reattach, repeated detach and repeated disposal have defined behavior.
- Permanent removal releases children, ports, subscriptions, custom cleanup and scheduled tasks; a disposed instance cannot be reattached silently.
- Reattachment installs listeners once and leaves no abandoned style elements or other attach-scoped DOM. Cover the minimap's current injected style pattern.
- Explicit hide/show remains distinct from scale activation; resource and root readiness are accurate.
- React cleanup and StrictMode do not leave registered layers or live resources behind.
- Author lifecycle hooks require no super calls and never observe uninitialized derived fields.
- Migration docs distinguish temporary detach, permanent removal and custom cleanup; existing strict/consumer/CI checks stay green.
Exact public hook names and cleanup registration syntax should be reviewed before implementation. This issue records intended semantics rather than locking an unfinished API.
- 主要言語
- 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
-
area:cli area:security bug priority:medium
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
"code source" and "numerique.gouv" links: "new window" mention duplicated in the accessible nameオープンaccessibility
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
numerique-gouv/lasuite-landingpage#315 ·
メンテナーはふだん 1 日以内に返信
-
needs:triage
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
HyeokjaeChoi/vaultme#585 ·
メンテナーはふだん 1 日以内に返信
-
enhancement priority/P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
beettlle/pi-smart-router#200 ·