Commit Graph

402 Commits

Author SHA1 Message Date
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
Daniel Compton c3a19788a2 Merge pull request #113 from led/patch-2
typo in comment
2015-09-07 09:53:51 +12:00
led 5a78f6b532 typo in comment 2015-09-06 15:59:58 +01:00
Samuel Miller 087d0eccfb Updated TodoMvc css to newest version. Fixes some issues with #94 2015-08-12 18:18:20 -06:00
Mike Thompson ebe19bda29 Merge pull request #98 from Day8/contributing
Add CONTRIBUTING.md guidelines
2015-08-12 09:23:52 +10:00
Daniel Compton ce219635a5 Merge pull request #97 from Day8/deploy-repositories
Add deploy repositories for clojars
2015-07-27 20:05:59 +12:00
Daniel Compton c3f0b9e68d Add deploy repositories for clojars 2015-07-27 20:05:26 +12:00
Daniel Compton 9033d0c9c3 Merge pull request #99 from Day8/travis
Remove addons, not necessary
2015-07-27 20:03:51 +12:00
Daniel Compton 79b33efcd4 Remove addons, not necessary 2015-07-27 19:57:23 +12:00
Daniel Compton bdc792d3d4 Use new apt-sources feature 2015-07-27 19:41:27 +12:00