Commit Graph

314 Commits

Author SHA1 Message Date
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
Mike Thompson 5656f79f06 Improve warning message. 2016-06-24 18:26:45 +10:00
Mike Thompson 0b2bcbe65e Complete undo/redo work 2016-06-23 23:41:20 +10:00
Stuart Mitchell f4fb65037e Subscriptions sugar - changed to provide a singleton 2016-06-22 15:41:22 +12:00
Stuart Mitchell 5c7d4ea3d1 Bug Fix for undo tests 2016-06-22 14:30:15 +12:00
Stuart Mitchell addc55658e Bug fix for undo.cljs 2016-06-22 13:34:25 +12:00
Mike Thompson 9452998e0b WIP. undo test fails. 2016-06-22 10:54:41 +10:00
Mike Thompson d03ef7bc7a remover excessive whitespace 2016-06-14 22:45:57 +10:00
Mike Thompson af2fd0b21f Merge branch 'develop' of https://github.com/Day8/re-frame into develop
Conflicts:
	src/re_frame/subs.cljs
2016-06-14 21:14:49 +10:00
Mike Thompson 4741cd73d3 Better naming and comments. 2016-06-14 21:10:56 +10:00
Mike Thompson 6250c584da Add undo API 2016-06-14 21:09:21 +10:00
Mike Thompson 2822dc064a Put all undo related into a single namespace. Change the way middleware factories are done. 2016-06-14 21:08:32 +10:00
Stuart Mitchell 5a4d78ecc8 register-pure-sub: moved into correct namespace 2016-06-14 14:52:37 +12:00
Stuart Mitchell 1b698b3d8f register-pure: added code to enable spec checking of the fn args 2016-06-14 14:52:37 +12:00
Stuart Mitchell 48a1bda438 register-pure-sub: uses a function to do the work 2016-06-14 14:52:25 +12:00
Mike Thompson ea1e9e7745 Light improvements to comments in core. 2016-06-11 22:23:53 +10:00
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