Commit Graph

420 Commits

Author SHA1 Message Date
Mike Thompson 67a6436843 Merge pull request #133 from kamn/develop
Added a space to make list in README.md appear
2015-12-08 07:16:20 +11:00
Mike Thompson fe48345d6d Merge pull request #135 from carouselapps/develop
Call the appropriate add-post-event-callback. For #118.
2015-12-07 08:13:48 +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
Mike Thompson e59cccd7a4 Begin v0.6.0.alpha1 2015-12-06 23:15:57 +11:00
Mike Thompson c20564938e Begin v0.6.0.alpha1 2015-12-06 23:15:05 +11:00
Mike Thompson 0d224876c8 Merge pull request #134 from scgilardi/develop
simplify the state machine
2015-12-06 22:12:47 +11:00
Samuel Miller c05be2461f Added a space to make list in README.md appear 2015-11-17 20:35:58 -07: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 780ae49e7d Improve change log. 2015-11-05 18:32:06 +11:00
mike-thompson-day8 fef2c4d3c6 Bump to version 0.5.0 2015-11-05 17:20:52 +11:00
mike-thompson-day8 b0928d7afe Final tweaks to Changes doc, ahead of new release. 2015-11-05 17:20:23 +11:00
mike-thompson-day8 9f62be30c2 Move example to latest versions 2015-11-05 17:19:48 +11:00
mike-thompson-day8 384b1fba7e More to latest deps. Make changes for new version of Schema. 2015-11-05 17:19:23 +11:00
Mike Thompson 7bbc9a240e Merge pull request #104 from kamn/develop
Updated TodoMvc css to newest version. Fixes some issues with #94
2015-11-05 11:13:09 +11:00
mike-thompson-day8 c80549ec95 Merge of #128. Thanks to @nowprovision 2015-11-05 11:08:45 +11:00
Mike Thompson 784018fac3 Merge pull request #130 from scgilardi/develop
proposed refinements to the 0.5.0-alpha3 router
2015-11-05 09:07:07 +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 cd230d1da2 Bump to alpha3 2015-11-04 17:12:06 +11:00
mike-thompson-day8 075af4bee2 rename action function, plus use 'case' for performance 2015-11-04 17:11:42 +11:00
Mike Thompson 4e45d632aa Merge pull request #129 from scgilardi/develop
proposed updates to new router, re: issue #125
2015-11-04 16:37:18 +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 657d08c544 Yet more word tweaks 2015-11-04 14:08:05 +11: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 e978bb0108 Add change log entries 2015-11-02 22:56:18 +11:00
mike-thompson-day8 c0da4d6606 Long delays on dispatch are gone. So no need to use dispatch-sync. 2015-11-02 22:38:59 +11:00
mike-thompson-day8 420e42aacc Introduce a router loop, not based on core-async 2015-11-02 22:37:46 +11:00
mike-thompson-day8 cb76ed3741 Use more modern dependencies 2015-11-02 22:37:04 +11:00
mike-thompson-day8 2e32a44b20 gitignore figwheel logs 2015-11-02 22:36:23 +11:00
Daniel Compton 7544af40a4 Add floobits to gitignore 2015-10-20 16:45:14 +13:00
Daniel Compton dd8ef423f1 Add PR's to CHANGES.md 2015-10-16 17:10:08 +13:00
Daniel Compton a9bdb84366 Bump version to alpha1 2015-10-16 17:00:37 +13: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
Daniel Compton 12b71b85e5 Update version to 0.5.0-SNAPSHOT 2015-10-16 14:47:15 +13:00
Daniel Compton 7e492930e3 Add dynamic subscriptions to re-frame
Dynamic subscriptions allow the user to specify subscriptions that
depend on Ratoms/Reactions and will be rerun when they change. Users
will subscribe with v and a vector of dynamic values. The dynamic values
are dereffed and passed to the handler-fn. Dynamic subscriptions need to
pass a fn which takes app-db, v, and the dereffed dynamic values.

Every time a dynamic value changes, handler-fn will be rerun. This is in
contrast to standard subscriptions where handler-fn will only be run
once, although the reaction that it produces will change over time.

A concrete example of the need for this is:
1. You want to subscribe to a query on a remote server which will return
a Reaction which changes in response to server changes.
2. You want this subscription to be able to be rerun when you change one
of the query parameters.

In the current system, all views need to be aware of the possibility of
changing parameters and provide them in their subscriptions.

Example usage code:

(register-sub
  :todo-dynamic
  (fn todo-dynamic [_ _ [active-list]]
    (let [q (q/get-query active-list)]
      q)))

(register-sub
  :todos
  (fn todos [db _]
    (let [active-list (subscribe [:active-list])
          todos       (subscribe [:todo-dynamic] [active-list])]
      (make-reaction (fn todo-vals [] (update @todos :result #(vals (:list %))))))))
2015-10-16 14:46:54 +13:00
Daniel Compton bbc6bc4abe Add section on open source re-frame applications
Fixes #122
2015-10-13 08:27:46 +13:00