Closed nhunzaker closed 6 years ago
Merging #432 into master will decrease coverage by
0.6%
. The diff coverage is40%
.
@@ Coverage Diff @@
## master #432 +/- ##
==========================================
- Coverage 84.59% 83.98% -0.61%
==========================================
Files 44 45 +1
Lines 1318 1349 +31
Branches 242 246 +4
==========================================
+ Hits 1115 1133 +18
- Misses 172 180 +8
- Partials 31 36 +5
Impacted Files | Coverage Δ | |
---|---|---|
packages/microcosm/src/addons/action-button.js | 0% <0%> (-100%) |
:arrow_down: |
packages/microcosm/src/addons/action-queue.js | 0% <0%> (ø) |
|
packages/microcosm/src/action.js | 100% <100%> (ø) |
:arrow_up: |
packages/microcosm-preact/src/action-form.js | 100% <100%> (ø) |
:arrow_up: |
packages/microcosm/src/microcosm.js | 100% <100%> (ø) |
:arrow_up: |
packages/microcosm-preact/src/action-button.js | 100% <100%> (ø) |
:arrow_up: |
packages/microcosm/src/addons/action-form.js | 97.61% <100%> (+97.61%) |
:arrow_up: |
packages/microcosm/src/addons/jest-matchers.js | 100% <100%> (ø) |
:arrow_up: |
packages/microcosm/src/history.js | 100% <100%> (ø) |
:arrow_up: |
... and 2 more |
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 7369bb5...7e5c150. Read the comment docs.
Before this commit, there was an issue where ActionForm and ActionButton callbacks would still fire if the related components unmounted. This resulted in an error where
setState
would call on an unmounted component for most of the use cases for these callbacks.Basically:
This commit does a couple of things:
Action::execute
: Moves coroutine behavior to the Action prototypeaction._origin
. Actions know what repo they were created with. This is necessary for execute, but could be used for other future work.ActionQueue
: A helper class for entities that must dispatch and track multiple actions.The result of this work is that ActionForm and ActionButton now "empty" their queue of actions when they unmount, unsubscribing any callbacks they set on those actions.
https://github.com/vigetlabs/microcosm/issues/425