Commit Graph

461 Commits

Author SHA1 Message Date
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
Daniel Compton af0190d76d Merge branch 'master' into develop
Update develop with the latest commits made on master.
This shouldn't be necessary in the future as PR' will go to develop first.
2015-09-28 10:16:47 +13:00
Daniel Compton 00eda37305 Bump to 0.4.2-SNAPSHOT 2015-09-28 10:04:40 +13:00
Daniel Compton e803659a56 Add clarification around usage of Github issues
Support questions need to go to other places.
2015-09-21 14:49:21 +12:00
Daniel Compton 93335b0ad4 Add clarification around usage of Github issues
Support questions need to go to other places.
2015-09-21 14:47:53 +12:00
Daniel Compton 7806a6499b Add CONTRIBUTING.md guidelines 2015-09-21 14:42:48 +12:00
Colin Yates 27835cf710 Updated README.md
Added an example of a subscription based on setup config for form-2 components.
2015-09-12 22:33:23 +12:00
Daniel Compton 2720b27e4c Merge pull request #100 from thenonameguy/patch-2
Use if-not instead of (if (not))
2015-09-12 20:27:35 +12:00
Daniel Compton 67c97ae668 Merge pull request #114 from Day8/revert-113-patch-2
Revert "typo in comment"
2015-09-07 11:43:47 +12:00
Daniel Compton 8977fa2351 Revert "typo in comment" 2015-09-07 11:43:30 +12:00