Fix non-interactive (FastBoot) hooks, and get them tested.#14233
Merged
Fix non-interactive (FastBoot) hooks, and get them tested.#14233
Conversation
added 2 commits
September 8, 2016 16:00
Can now pass `ownerOptions` (to be passed to the `Owner.create`), `resolver` (to be used at the backing resolver for the fallback registry), and `bootOptions` (to be used to specify custom `BootOptions` like `isInteractive`).
This refactors the lifecycle hook tests and fixes `CurlyComponentManager` to ensure that the hooks are fired correctly. The following hooks are fired in all modes: * `init` * `didReceiveAttrs` * `willRender` * `didUpdateAttrs` * `willUpdate` * `willDestroy` The following hooks are fired in interactive mode only: * `didInsertElement` * `didRender` * `didUpdate` * `willDestroyElement` * `willClearRender`
4 tasks
chancancode
added a commit
that referenced
this pull request
Sep 27, 2016
This is a follow-up to #14233. At the September 2016 core team face-to-face meeting, we discussed and clarified the intended features for life-cycle hooks in non-iterative environments (i.e. FastBoot). We agreed that components on FastBoot should only react to data changes via the `didReceiveAttrs` and `didUpdateAttrs` hooks. (There is also deprecated `didInitAttrs` hook.) The main change is that we have been incorrectly calling `willRender` and `willUpdate` in non-interactive mode so far (at least since we last checked and added the tests). The problem is that `{will,did}Render` and `{will,did}Update` are intended to work as a pair so running one but not the other could introduce unexpected bugs for applications.
chancancode
added a commit
that referenced
this pull request
Sep 27, 2016
This is a follow-up to #14233. At the September 2016 core team face-to-face meeting, we discussed and clarified the intended features for life-cycle hooks in non-iterative environments (i.e. FastBoot). We agreed that components on FastBoot should only react to data changes via the `didReceiveAttrs` and `didUpdateAttrs` hooks. (There is also deprecated `didInitAttrs` hook.) The main change is that we have been incorrectly calling `willRender` and `willUpdate` in non-interactive mode so far (at least since we last checked and added the tests). The problem is that `{will,did}Render` and `{will,did}Update` are intended to work as a pair so running one but not the other could introduce unexpected bugs for applications.
rwjblue
pushed a commit
that referenced
this pull request
Sep 27, 2016
This is a follow-up to #14233. At the September 2016 core team face-to-face meeting, we discussed and clarified the intended features for life-cycle hooks in non-iterative environments (i.e. FastBoot). We agreed that components on FastBoot should only react to data changes via the `didReceiveAttrs` and `didUpdateAttrs` hooks. (There is also deprecated `didInitAttrs` hook.) The main change is that we have been incorrectly calling `willRender` and `willUpdate` in non-interactive mode so far (at least since we last checked and added the tests). The problem is that `{will,did}Render` and `{will,did}Update` are intended to work as a pair so running one but not the other could introduce unexpected bugs for applications. (cherry picked from commit b4d22a8)
webark
pushed a commit
to webark/ember.js
that referenced
this pull request
Oct 6, 2016
This is a follow-up to emberjs#14233. At the September 2016 core team face-to-face meeting, we discussed and clarified the intended features for life-cycle hooks in non-iterative environments (i.e. FastBoot). We agreed that components on FastBoot should only react to data changes via the `didReceiveAttrs` and `didUpdateAttrs` hooks. (There is also deprecated `didInitAttrs` hook.) The main change is that we have been incorrectly calling `willRender` and `willUpdate` in non-interactive mode so far (at least since we last checked and added the tests). The problem is that `{will,did}Render` and `{will,did}Update` are intended to work as a pair so running one but not the other could introduce unexpected bugs for applications.
mixonic
pushed a commit
to mixonic/ember.js
that referenced
this pull request
Oct 22, 2016
This is a follow-up to emberjs#14233. At the September 2016 core team face-to-face meeting, we discussed and clarified the intended features for life-cycle hooks in non-iterative environments (i.e. FastBoot). We agreed that components on FastBoot should only react to data changes via the `didReceiveAttrs` and `didUpdateAttrs` hooks. (There is also deprecated `didInitAttrs` hook.) The main change is that we have been incorrectly calling `willRender` and `willUpdate` in non-interactive mode so far (at least since we last checked and added the tests). The problem is that `{will,did}Render` and `{will,did}Update` are intended to work as a pair so running one but not the other could introduce unexpected bugs for applications.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This refactors the lifecycle hook tests and fixes
CurlyComponentManagerto ensure that the hooks are fired correctly.The following hooks are fired in all modes:
initdidReceiveAttrswillRenderdidUpdateAttrswillUpdatewillDestroyThe following hooks are fired in interactive mode only:
didInsertElementdidRenderdidUpdatewillDestroyElementwillClearRender