Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX beta] Don't dispatch new lifecycle hooks to views #11229

Merged
merged 1 commit into from
May 25, 2015

Conversation

chancancode
Copy link
Member

Patch for #11143

Since 84c2875, the lifecycle hooks are inconsistent between views and
components. For example, the willReceiveAttrs hook has been renamed to
didReceiveAttrs on components but not on views. Talked to @wycats about it,
the plan is "to remove all of the new lifecycle hooks from views", because
"views are sufficiently crazy that I don't want to try to mix in new semantics".

In this commit:

  • ✂️ didUpdate from Views
  • ✂️ willReceiveAttrs from Views
  • Rename willRender to _willRender on Views (for now)
  • Rename willUpdate to _willUpdate on Views (for now)

TODO:

  • Refactor internal Views to not use _willRender
  • Refactor internal Views to not use _willUpdate
  • ✂️ _willRender from Views
  • ✂️ _willUpdate from Views

@wycats can you c/d if this is on the right track?

Since 84c2875, the lifecycle hooks are inconsistent between views and
components. For example, the `willReceiveAttrs` hook has been renamed to
`didReceiveAttrs` on components but not on views. Talked to @wycats about it,
the plan is "to remove all of the new lifecycle hooks from views", because
"views are sufficiently crazy that I don't want to try to mix in new semantics".

In this commit:

- [x] ✂️ `didUpdate` from `View`s
- [x] ✂️ `willReceiveAttrs` from `View`s
- [x] Rename `willRender` to `_willRender` on `View`s (for now)
- [x] Rename `willUpdate` to `_willUpdate` on `View`s (for now)

TODO:

- [ ] Refactor internal `View`s to not use `_willRender`
- [ ] Refactor internal `View`s to not use `_willUpdate`
- [ ] ✂️ `_willRender` from `View`s
- [ ] ✂️ `_willUpdate` from `View`s
@chancancode chancancode changed the title Don't dispatch new lifecycle hooks to views [BUGFIX beta] Don't dispatch new lifecycle hooks to views May 21, 2015
@wycats
Copy link
Member

wycats commented May 21, 2015

I can confirm that this is on the right track 😄

@rwjblue
Copy link
Member

rwjblue commented May 25, 2015

Looks good. Will merge this, and then when you have time you can finish the additional TODO items.

rwjblue added a commit that referenced this pull request May 25, 2015
[BUGFIX beta] Don't dispatch new lifecycle hooks to views
@rwjblue rwjblue merged commit 2e0936f into emberjs:master May 25, 2015
@chancancode
Copy link
Member Author

didReceiveInternetPoints, willSubmitAnotherPullRequest

@chancancode chancancode deleted the rm-view-lifecycle-hooks branch May 25, 2015 20:36
@rwjblue
Copy link
Member

rwjblue commented May 25, 2015

LOL, 👍 willMergeAgain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants