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

Replace history.invoke with event emissions #293

Merged
merged 1 commit into from Apr 11, 2017
Merged

Conversation

nhunzaker
Copy link
Contributor

@nhunzaker nhunzaker commented Apr 11, 2017

Instead of having the history track a list of microcosms, history now
emits events:

  • append: when an action is created
  • update: when an action has changed
  • remove: when an action has archived or been removed
  • reconcile: when a history has completed reconciliation
  • release: when a history has done all work, and it is safe to emit a change event

The release and reconcile events used to be the same operation, however by keeping them separate, we can start to expose the ability to control the update process. Specifically, I want to support a future feature where users can implement batching.

@codecov-io
Copy link

codecov-io commented Apr 11, 2017

Codecov Report

Merging #293 into 12-dev will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           12-dev   #293   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          22     22           
  Lines         801    802    +1     
=====================================
+ Hits          801    802    +1
Impacted Files Coverage Δ
src/history.js 100% <100%> (ø) ⬆️
src/emitter.js 100% <100%> (ø) ⬆️
src/microcosm.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e34dbb4...c5ed505. Read the comment docs.

Instead of having the history track a list of microcosms, history now
emits events:

- append: when an action is created
- update: when an action has changed
- remove: when an action has archived or been removed
- reconcile: when a history has completed reconciliation
- release: when a history has done all work, and it is safe to emit a
  change event

The release and reconcile events used to be the same operation,
however by keeping them separate, we can start to expose the ability
to control the update process. Specifically, I want to support a
future feature where users can implement batching.
Copy link
Contributor

@solomonhawk solomonhawk left a comment

Choose a reason for hiding this comment

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

👍

@mackermedia
Copy link
Contributor

👍

@nhunzaker nhunzaker merged commit c5ed505 into 12-dev Apr 11, 2017
@nhunzaker
Copy link
Contributor Author

Thanks, gents!

@nhunzaker nhunzaker deleted the history-events branch April 17, 2017 18:01
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.

None yet

4 participants