jamesplease / jamesplease/puppets

Think about recursive removal

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
No language data
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

`View#remove` should be a reliable method, but right now it is ignorant of any idea of there being a nested view structure. Are there memory leak issues there? I need to think about how I want to handle the shutdown of the entire view tree.

`remove` plucks the element from the DOM tree and calls `stopListening`, so presumably I should do a few things at this point:
- Trigger an `onDetach` event down the whole tree (assuming the view was attached in the first place?)
- Call `stopListening` down the entire tree

Note to self: right now, each view has its entire tree in a collapsed form available under `_childViews`, which could be utilized in situations like this.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at View#remove and inspect how the collapsed _childViews tree is maintained. Review the existing stopListening behavior and determine whether onDetach already exists or needs defined semantics. Done means agreeing on and implementing reliable shutdown behavior for the entire view tree, including whether detached views should trigger onDetach.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.