LivelyKernel / LivelyKernel/lively4-core

Extract expandChild a to VivideObject

Open
#352 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

comp: vivide effort1: easy (hours) P2: required type: refactoring
Dominant language
JavaScript
Stars
89
Forks
25
PR merge metrics
No merged PRs in 30d

Description

`expandChild` asynchronously fetches the child layer of a `VivideObject`.

Having a `VivideView` dynamically setting the `expandChild` method onto a widget, seems counterintuitive.

Instead, this method should be exposed by the `VivideObject` itself:

```JavaScript
childLayer = await vivideObject.getChildren();
```

---

Also, a widget should not be in charge of setting the `childLayer` of a `VivideObject`:

```JavaScript
object.childLayer = await this.expandChild(childData, childLayer.script);
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the VivideObject, VivideView, widget, and expandChild entry points, then trace how child layers are currently fetched and assigned. Define the change around VivideObject.getChildren() so widgets no longer install expandChild or assign childLayer themselves, and verify all existing callers still obtain the expected child layer.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
developer-experience
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.