Commit Graph

333 Commits

Author SHA1 Message Date
Daniel Compton 46b85b1862 Call next-tick with a bound-fn to carry bindings across 2016-08-17 10:29:25 +12:00
Mike Thompson baa61a3749 Complete rename from `do-effects` to `do-fx` 2016-08-16 13:00:52 +10:00
Mike Thompson 4f2f772afd The function `coeffect` is renamed to `inject-cofx`.
When writing the docs I found that sentences had too many mentions of `coeffects` with different meanings, which was confusing.  With this change, I remove one possible meaning of `coeffect` and, in the process I end up with a clearer name anyway.
2016-08-16 12:30:01 +10:00
Mike Thompson 98d01a7c84 change name from `do-effects` to `do-fx`. More consistent. 2016-08-16 12:24:23 +10:00
Mike Thompson c50ba86cd4 Remove deprecation warning on `reg-event`. It was only there for intermediate alpha releases. 2016-08-16 12:23:22 +10:00
Mike Thompson db9aa06de9 Comment wording 2016-08-13 13:17:47 +10:00
Mike Thompson 6d3acf2c08 Add get-hander arity which returns an entire kind 2016-08-12 13:19:48 +10:00
Mike Thompson ec08a824a1 Fix bug which meant unknown effects were silently ignored. 2016-08-12 13:18:59 +10:00
Mike Thompson add6b79168 Improve comment 2016-08-10 18:25:45 +10:00
Mike Thompson b7deb29f84 Move comment and readjust format. 2016-08-10 18:25:44 +10:00
Sam Roberton 60fa4bf5e1 Keep JVM thread bindings on next-tick
... to enable clojure.test reporting to identify the current test.
2016-08-10 09:40:06 +10:00
Mike Thompson 486c7e61ee Slight rework of `debug` interceptor 2016-08-09 19:26:03 +10:00
Mike Thompson c891b784e8 Correct bug in example code 2016-08-09 19:25:26 +10:00
Mike Thompson 69c396c793 Start tranistion to always call first `-fx` parameter `coeffects`, not `world`. 2016-08-09 19:24:32 +10:00
Mike Thompson e45fd8b858 If debug interceptor was "to the left" of path, debug would not show correct diffs. Make path reinstate effect to fix this. 2016-08-09 19:22:15 +10:00
Alan Leal 28afe57b96 fixes typo in log level warn (#190) 2016-08-09 12:18:22 +12:00
Mike Thompson a475767ce0 More consistent naming 2016-08-08 23:15:26 +10:00
Mike Thompson 6a172ddbe0 Fix bug identified by @samroberton https://github.com/Day8/re-frame/pull/189 2016-08-08 23:10:41 +10:00
Mike Thompson c8659d6770 Version 0.8.0-alpha10 2016-08-08 15:30:38 +10:00
Mike Thompson f78541af59 Split clj and cljs code into more distinct sections, rather than have them interspersed. 2016-08-04 22:20:23 +10:00
Mike Thompson fe6148a554 Comment fiddling 2016-08-04 22:19:25 +10:00
Mike Thompson 3ecfbcd41c Add note on registrar needs. 2016-08-04 22:19:04 +10:00
Mike Thompson 2c7812374d Make interceptor API available. I find I need to use it in the undo library. 2016-08-04 22:18:43 +10:00
Mike Thompson 4ade89c74e rework implementation of subscriptions 2016-08-04 17:08:08 +10:00
Mike Thompson d70c8c2c5e No longer remembering dispatch stack 2016-08-04 11:15:58 +10:00
Mike Thompson 139e27c706 Colocate TODOs 2016-08-03 18:40:38 +10:00
Mike Thompson d3ffbf1415 Remove completed todos 2016-08-03 18:39:39 +10:00
Mike Thompson fbbcfc165b Improve deprecation messages. 2016-08-03 18:09:53 +10:00
Mike Thompson ea2dbff974 Work on Changes.md 2016-08-03 17:36:18 +10:00
Mike Thompson 5d87acbd3e Fix up ctx registration 2016-08-03 17:35:49 +10:00
Mike Thompson e527deea99 Add deprecation for reg-event. 2016-08-03 17:35:17 +10:00
Mike Thompson 8737d57b0d Misc interceptor cleanups 2016-08-03 17:34:30 +10:00
Mike Thompson a97741ada0 Add `ctx-handler->interceptor` 2016-08-03 17:33:18 +10:00
Mike Thompson 8ef5c6b8ba Reorganize my lets 2016-08-03 17:32:42 +10:00
Mike Thompson 3b14f3ffb6 Give names to anonymous functions 2016-08-03 17:32:06 +10:00
Mike Thompson 3e203c6650 Improve comment 2016-08-03 17:30:46 +10:00
Mike Thompson 600c12a285 Provide an example of a coeffect-ing interceptor 2016-08-03 17:19:28 +10:00
Mike Thompson 311367dc3d Change to Interceptors (away from middleware). This is a big code drop.
Tests pass and todomvc works.
But there is some ugliness to now resolve, and a couple of  unresolved issues.
2016-08-03 12:53:01 +10:00
Mike Thompson 7fff9c6039 Improve comments around post-event-callback stuff 2016-07-29 14:31:31 +10:00
Mike Thompson 996eda62ce alpha9 - fix another bug 2016-07-28 19:00:17 +10:00
Mike Thompson 16d4da2c62 Fix bug with queue initialisation 2016-07-28 18:52:35 +10:00
Mike Thompson 9f61691279 Add helpful warnings when post event callback fns find a problem 2016-07-28 16:37:57 +10:00
Mike Thompson a5a2cc9bdc rename fmap to map-vals 2016-07-28 15:55:24 +10:00
Mike Thompson c250bbbc9d Comment change 2016-07-28 15:55:02 +10:00
Mike Thompson e2034f4576 Allow registration and de-registration of post event callbacks via an id. 2016-07-28 14:50:39 +10:00
Mike Thompson 05c1e1fbd9 Produce deprecation warnings rather than errors. Dispense with warnings on earlier alpha changes. 2016-07-28 14:01:03 +10:00
Mike Thompson 358efc7091 Remove old todos 2016-07-27 22:34:04 +10:00
Mike Thompson c60e096d55 Correct bug in previous commit 2016-07-27 22:31:36 +10:00
Mike Thompson 29e3bfe145 Improve error strings. Use destructure 2016-07-27 22:26:22 +10:00
hipitihop e884dcadb6 Simplify :dispatch-later and only support single :dispatch 2016-07-27 16:03:29 +10:00
hipitihop 12f6eeee3c Change :dispatch-later fx handler now expects vector of {:ms ... :dispatch ...} & add unit test 2016-07-27 15:43:47 +10:00
hipitihop 6344d0a53c fx - check :dispatch effect val to be vector? & introduce new effect :dispatch-n for 2016-07-26 16:53:50 +10:00
Daniel Compton 0ce1a04930 Return nil when registering a handler 2016-07-26 16:09:56 +12:00
Mike Thompson e47caa2f34 Improve comment 2016-07-26 11:42:02 +10:00
Mike Thompson d2645c089d add helpful error messages which explain recent renaming 2016-07-24 18:14:43 +10:00
Mike Thompson f5175223d5 v0.8.0-alpha3 2016-07-24 17:13:15 +10:00
Mike Thompson 658f3b0232 Switch to using `reg-*` naming, instead of `def-*` naming 2016-07-24 17:08:09 +10:00
Mike Thompson 52d61c03b3 Merge branch 'master' into develop
Conflicts:
	src/re_frame/subs.cljc
2016-07-23 09:52:41 +10:00
Oliver Hine 5daafa7db4 Fix never-ending warn about not implementing IReactiveAtom 2016-07-22 19:44:05 +01:00
Stuart Mitchell faae34822c Removed undo functionality as it is not handled in day8.re-frame/undo 2016-07-22 14:02:18 +12:00
Daniel Compton 7bf6902230 Lower logging levels of normal events
We don't need to use the :warn logging level for standard events.
2016-07-22 12:40:26 +12:00
Sam Roberton 02ec0c26e6 CLJC: fix subs handlers to supply correct arity 2016-07-21 17:56:46 +10:00
Sam Roberton ef3656ff60 CLJC: tools.logging as default re-frame.loggers 2016-07-21 17:08:38 +10:00
Sam Roberton b4d915c395 CLJC bugfix: IAtom is an interface, not a protocol 2016-07-21 17:08:01 +10:00
Sam Roberton 951682db81 CLJC: address (some of) Daniel's review comments 2016-07-21 12:42:25 +10:00
Sam Roberton cc33fe5a95 First pass at converting to CLJC for JVM testing
Note that the goal of using CLJC here is to enable writing and running
`deftest`s in JVM Clojure to test your (CLJS) re-frame app.  Actually
running a re-frame app as a meaningful thing on the JVM (other than for
tests) is explicitly *not* a goal.

- All files renamed *.cljs -> *.cljc
- New `re-frame.interop` ns for stuff that's different between CLJS and
  JVM Clojure, including Reagent interop.
- Other CLJS incompatibilities (eg `catch :default` and `deftype`'s
  `^:mutable` vs `^:volatile-mutable`) are handled with reader
  conditionals in-place.
2016-07-20 19:19:56 +10:00
hipitihop 3c4b0791fc correct use of list? to account for lazy seqs 2016-07-20 17:16:01 +10:00
Stuart Mitchell 25a197cdd9 Removed possibly confusing usage of spec to parse function arguments in register-pure 2016-07-20 17:48:10 +12:00
hipitihop d8e97b86d7 comment typos 2016-07-20 10:35:19 +10:00
Mike Thompson f220e6821b Merge pull request #181 from Day8/spec
Moved todomvc to spec checking
2016-07-20 09:53:39 +10:00
Mike Thompson 018eb0dff5 Better comment 2016-07-20 09:52:26 +10:00
Stuart Mitchell 1dd52faeae Moved todomvc to spec checking 2016-07-20 11:39:59 +12:00
Mike Thompson 854109ed46 Merge remote-tracking branch 'origin/stack-dispatch' into develop
Conflicts:
	src/re_frame/router.cljs
2016-07-19 22:25:23 +10:00
Mike Thompson 06bec5b1d0 Even though they are temporary log messages, switch to use offical method. 2016-07-19 18:51:45 +10:00
Mike Thompson f42a4fa349 Get rid of another explicit js/Error reference 2016-07-19 18:51:04 +10:00
Mike Thompson faece2fd0f Remove explicit use of js/Error. Starting the process of making re-frame cljc-ready 2016-07-19 18:37:03 +10:00
Stuart Mitchell 19ede7bac5 Adds informational stack traces to errors in dispatch 2016-07-19 16:46:33 +12:00
Mike Thompson 3739369c64 Better comment 2016-07-19 14:33:52 +10:00
Mike Thompson 3311d02c22 Switch from using `doall` to `dorun` 2016-07-18 23:54:39 +10:00
Mike Thompson 19f70625e1 Add console to core. 2016-07-18 19:37:01 +10:00
Mike Thompson 2c370cf8d3 Move `:forward-events` to be its own library. 2016-07-15 23:51:40 +10:00
Mike Thompson f6d191f425 Better docs on new effect 2016-07-15 18:46:16 +10:00
Mike Thompson 927d2c03a1 remove laziness 2016-07-15 14:15:30 +10:00
Mike Thompson 9294adb1b5 Improve warning message if incorrect use of fx detected. 2016-07-15 11:40:07 +10:00
Mike Thompson daf070b1fd Merge branch 'develop' of https://github.com/Day8/re-frame into develop 2016-07-15 11:34:42 +10:00
Mike Thompson 800a1a2d6b closer now to having :forward-events working. 2016-07-15 11:33:35 +10:00
Mike Thompson d0827bb578 Update comment for the new world 2016-07-15 11:33:07 +10:00
Mike Thompson 40d0a749d4 Remove incorrect use of re-frame.middleware/fx (should have been re-frame.fx/fx) 2016-07-15 11:32:44 +10:00
snowell 0f117eaac7 Insignificant typo correction in console output (#177) 2016-07-15 10:36:07 +12:00
Mike Thompson 2c9d140c22 Initial fx code now in. But it remains largely untested. 2016-07-14 16:41:54 +10:00
Mike Thompson b75ec509bb Further towards fx 2016-07-14 00:32:36 +10:00
Mike Thompson 5572e6ebf1 Checkpoint. Further Miscellaneous work towards Effectual Handlers 2016-07-13 16:28:15 +10:00
Mike Thompson b395ef40de Update and clarify in changes document. 2016-07-11 16:52:05 +10:00
Mike Thompson 0d31e3c7c6 Cut v0.8.0-alpha1 2016-07-07 14:52:13 +10:00
Mike Thompson 8747d2b14a Move to using reg-sub (rather than register-sub-pure) 2016-06-24 23:15:00 +10:00
Mike Thompson cbef1ec268 Remove use of specific loggers. Everything now goes through re-frame.loggers/console. 2016-06-24 22:56:30 +10:00
Mike Thompson 72397eb6e7 Improve code layout in loggers. 2016-06-24 22:15:24 +10:00
Mike Thompson 6cb23b60a5 Put loggers into their own namespace 2016-06-24 22:09:07 +10:00
Mike Thompson d384da1c75 Alter wording in comments. 2016-06-24 21:31:12 +10:00
Mike Thompson a8b35cd9f1 Improve comment on function 2016-06-24 18:49:42 +10:00