Commit Graph

168 Commits

Author SHA1 Message Date
Mike Thompson 5a214fc83b Fix bug which meant that post-event-callbacks were not called for `dispatch-sync` 2016-06-04 00:13:41 +10:00
Mike Thompson 9adf4cf40b Improve API comment 2016-06-03 12:58:06 +10:00
Mike Thompson 5684543b1a Introduce new API - `remove-post-event-callback` 2016-06-03 12:49:49 +10:00
Mike Thompson 053771ad9d Breaking change to logging 2016-05-31 07:50:49 +10:00
Mike Thompson 3d4e8cde8f Introduce de-duplicated subscriptions. 2016-05-29 23:23:17 +10:00
Mike Thompson c7fb38becf Error message made more generic 2016-05-29 22:48:18 +10:00
Mike Thompson e562b06880 Better router loop comments 2016-05-29 22:47:25 +10:00
Mike Thompson fe1b6bc729 improve trivial comment 2016-05-27 12:54:42 +10:00
Mike Thompson 45e0baee30 Get rid of code for Reagent pre-0.6.0. Plus add more comments. 2016-05-21 00:44:54 +10:00
Mike Thompson 5aafe09c1b Add link to alternative debug middleware 2016-05-21 00:44:16 +10:00
Mike Thompson 41593509be Improved comment 2016-05-20 22:36:35 +10:00
Daniel Compton 477459bae0 Fix grouping of debug/middleware 2016-05-05 12:40:02 +12:00
Daniel Compton c085ac8bb0 middleware/debug: Log a single line if app-db not changed by a handler
middleware/debug logs a group to the console even if there has been no
change to app-db. This makes it harder to tell if you've made a mistake
in refactoring, as the same log message will be shown whether or not
app-db is changing.

This change will log a single line if app-db is not changed by a handler

Fixes #166
2016-05-05 11:56:09 +12:00
Mike Thompson c182af1b59 Add comment on middleware 2016-03-22 14:11:21 +11:00
Mike Thompson 9b64df912d Actually remove log-ex. Commented out in last release. 2016-03-15 20:08:25 +11:00
Mike Thompson 9795a00ec7 Tweak debug middleware output so that exceptions don't get lost in collapsed Groups. 2016-03-14 23:32:24 +11:00
Mike Thompson f821c99858 Remove `log-ex` middleware - no longer needed 2016-03-14 21:00:33 +11:00
Mike Thompson 2c2c1c6612 Take out "experimental" comment near `on-changes`. It became official some time ago. 2016-02-26 23:01:54 +11:00
Mike Thompson 3246265483 Added one tick of extra pause when events have `:flush=dom` metadata. Previously, there were odd times when the pause wasn't enough. 2016-02-26 14:24:34 +11:00
Daniel Compton 41cf9951d8 Add tests for undo behaviour
Inspired by #149, this adds tests to cover the change that was made. It
also tests the redo logic.
2016-01-28 23:14:43 +13:00
Sergey Tselovalnikov bb78981e1d Fix behavior with large undo lists 2016-01-28 21:31:08 +13:00
Markus Bertheau 4115e410d6 Correct spelling 2016-01-23 18:07:20 +13:00
Markus Bertheau 4822688a62 Correct doc reference to handlers/register-base 2016-01-23 18:07:00 +13:00
Mike Thompson 00f706688a Make router work with 0.6.0 of reagent (and be backwards compatible) 2015-12-22 00:17:33 +11:00
Mike Thompson 8c01555a6a Further docs tweaks for v0.6.0 2015-12-09 07:40:47 +11:00
Mike Thompson 2ce82d9fda Add docs for new `add-post-event-callback`. Promote `on-change` to officially being a part of the API. 2015-12-08 08:19:59 +11:00
J. Pablo Fernández 4b84166566 Call the appropriate add-post-event-callback. For #118. 2015-12-06 19:10:32 +00:00
Mike Thompson 927d318626 First pass at providing what @pupeno needs for #118 2015-12-06 23:19:11 +11:00
Stephen C. Gilardi e77fc53e53 simplify state handling around resume 2015-11-06 23:04:45 -05:00
Stephen C. Gilardi 4a3d951568 direct call to -run-queue from resume
- this now happens in the :running state
  - just like a run-queue, but with an unconditional handling of the
    first item on the queue
- no need to trigger here
2015-11-06 23:03:07 -05:00
Stephen C. Gilardi fc9fa490a6 reorder to be the same as the order in the prototype 2015-11-06 23:01:55 -05:00
Stephen C. Gilardi bde07088a4 simplify names: pause, resume, regularize run-queue
- pause-run -> pause
- begin-resume -> resume
  - no longer a multi-step process
- begin-run -> run-queue
  - so all action function names match their keywords
2015-11-06 22:58:15 -05:00
Stephen C. Gilardi 38120c4913 fix a couple of comment typos 2015-11-06 22:50:50 -05:00
mike-thompson-day8 c80549ec95 Merge of #128. Thanks to @nowprovision 2015-11-05 11:08:45 +11:00
Stephen C. Gilardi 6551c010b3 make run-queue more compact 2015-11-04 15:36:41 -05:00
Stephen C. Gilardi aedafd1ac9 doc string edits 2015-11-04 09:15:53 -05:00
Stephen C. Gilardi ffa676744d a few minor comment mods 2015-11-04 09:15:53 -05:00
Stephen C. Gilardi 6751414320 some light editing of the router loop explanation
- preserving all the flavor
2015-11-04 09:15:53 -05:00
Stephen C. Gilardi 4533d51fbe regularize fsm code formatting
- full align vectors on the left side within a group
- one space between left and right side
- align # marks in vectors on the right side within a group
- also arg1 -> arg
2015-11-04 09:15:52 -05:00
Stephen C. Gilardi 08e8b450ee optimize and DRY up pause-run handling 2015-11-04 09:15:52 -05:00
Stephen C. Gilardi ceafa00483 update/minimize ns form for new impl 2015-11-04 08:07:33 -05:00
mike-thompson-day8 075af4bee2 rename action function, plus use 'case' for performance 2015-11-04 17:11:42 +11:00
Stephen C. Gilardi 4be6227b02 revise fsm terminology around resuming 2015-11-04 00:14:11 -05:00
Stephen C. Gilardi b32aeab413 fix [:do-paused :add-event] state transition 2015-11-04 00:10:28 -05:00
mike-thompson-day8 46c627430f Wording changes in docs 2015-11-04 13:33:50 +11:00
mike-thompson-day8 e9a3b1ebeb Improve wording of comments 2015-11-02 23:43:19 +11:00
mike-thompson-day8 420e42aacc Introduce a router loop, not based on core-async 2015-11-02 22:37:46 +11:00
Daniel Compton a2e8c09775 Use yield instead of (timeout 0)
(timeout 0) resolves to using js/setTimeout which will actually take 4+
msecs in browsers. This is an eternity. The nextTick approach was
proposed by Patrick O'Brien and implemented here.

Docs on nextTick from Closure library:

Fires the provided callbacks as soon as possible after the current JS
execution context. setTimeout(…, 0) takes at least 4ms when called from
within another setTimeout(…, 0) for legacy reasons.

This will not schedule the callback as a microtask (i.e. a task that can
preempt user input or networking callbacks). It is meant to emulate what
setTimeout(_, 0) would do if it were not throttled. If you desire
microtask behavior, use goog.Promise instead.
2015-10-16 14:49:10 +13:00
Daniel Compton 3e8f1e1dfa Log warning when non reactive parameters are passed to dynamic subscriptions
Closes #115
2015-10-16 14:47:15 +13:00
Daniel Compton 518ff995dc Remove extra level of indirection when creating dynamic subscription
Instead of creating a RAtom and resetting into it on a seperate side
chain of our dependency graph, we can instead return a reaction which is
the result of @@sub, achieving the same goals but with less code and
complexity.
2015-10-16 14:47:15 +13:00