aurelia / aurelia/templating

@children timing issue

Open
#403 16 comments 1 reaction 0 assignees View on GitHub
bug question
Dominant language
TypeScript
Stars
113
Forks
101
PR merge metrics
No merged PRs in 30d

Description

This is a continuation of https://github.com/aurelia/templating/issues/379#issuecomment-225373659

When bluebird is used a timing issue occurs where the `@children` array is empty from the `attached()` callback. I was able to resolve this by using the unminified bluebird (instead of the minified one) but this doesn't resolve the issue for everyone. @children is used a lot in aurelia-kendoui-bridge. For example, `@children` is used to get `` definitions inside a ``.

Since a lot of people rely on bluebird to resolve the Edge issue this effectively makes the bridge unusable. I was able to workaround this issue by delaying code in the `attached()` callback using the taskqueue but that caused other issues.

gist.run: https://gist.run/?id=14ac85668b3ca27dcd8ad6d3f6579fb0
repository: https://github.com/JeroenVinke/children-timing-issue

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the @children timing issue using the linked gist and the children-timing-issue repository, focusing on the attached() callback and the Bluebird configuration. Compare the empty @children array with the taskqueue workaround and define done as consistent child availability in attached() without introducing the reported follow-up issues.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.