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

Introduce lifecycle hooks #95

Merged
merged 1 commit into from
Aug 28, 2015
Merged

Introduce lifecycle hooks #95

merged 1 commit into from
Aug 28, 2015

Conversation

mixonic
Copy link
Contributor

@mixonic mixonic commented Aug 27, 2015

  • didUpdatePost, which gets passed the postEditor
  • willRender, before render after post changes are complete
  • didRender, after render when DOM and post are in sync

TODO:

  • Docs

@mixonic
Copy link
Contributor Author

mixonic commented Aug 27, 2015

@bantic this is good to go.

@mixonic mixonic mentioned this pull request Aug 27, 2015
@@ -319,6 +332,8 @@ class Editor {
showForTag: 'a'
}));

// Stub out a post editing session for initial render
this.run(() => {});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the empty run there? It's not clear to me from that comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will elaborate, poor wording there.

* didUpdatePost, which gets passed the postEditor
* willRender, before render after post changes are complete
* didRender, after render when DOM and post are in sync
mixonic added a commit that referenced this pull request Aug 28, 2015
Introduce lifecycle hooks
@mixonic mixonic merged commit 64e4367 into bustle:master Aug 28, 2015
@mixonic mixonic deleted the lifecycle branch August 28, 2015 14:54
@mixonic
Copy link
Contributor Author

mixonic commented Aug 28, 2015

🎉

@@ -319,6 +332,9 @@ class Editor {
showForTag: 'a'
}));

// A call to `run` will trigger the didUpdatePostCallbacks hooks with a
// postEditor.
this.run(() => {});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be this.runCallbacks() or something? This looks like the sort of no-op-y code that will get deleted by someone in the future.

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.

2 participants