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
Mike Thompson
3d4e8cde8f
Introduce de-duplicated subscriptions.
2016-05-29 23:23:17 +10:00
Mike Thompson
c7fb38becf
Error message made more generic
2016-05-29 22:48:18 +10:00
Mike Thompson
e562b06880
Better router loop comments
2016-05-29 22:47:25 +10:00
Mike Thompson
fe1b6bc729
improve trivial comment
2016-05-27 12:54:42 +10:00
Mike Thompson
45e0baee30
Get rid of code for Reagent pre-0.6.0. Plus add more comments.
2016-05-21 00:44:54 +10:00
Mike Thompson
5aafe09c1b
Add link to alternative debug middleware
2016-05-21 00:44:16 +10:00
Mike Thompson
41593509be
Improved comment
2016-05-20 22:36:35 +10:00
Daniel Compton
477459bae0
Fix grouping of debug/middleware
2016-05-05 12:40:02 +12:00
Daniel Compton
c085ac8bb0
middleware/debug: Log a single line if app-db not changed by a handler
...
middleware/debug logs a group to the console even if there has been no
change to app-db. This makes it harder to tell if you've made a mistake
in refactoring, as the same log message will be shown whether or not
app-db is changing.
This change will log a single line if app-db is not changed by a handler
Fixes #166
2016-05-05 11:56:09 +12:00
Mike Thompson
c182af1b59
Add comment on middleware
2016-03-22 14:11:21 +11:00
Mike Thompson
9b64df912d
Actually remove log-ex. Commented out in last release.
2016-03-15 20:08:25 +11:00
Mike Thompson
9795a00ec7
Tweak debug middleware output so that exceptions don't get lost in collapsed Groups.
2016-03-14 23:32:24 +11:00
Mike Thompson
f821c99858
Remove `log-ex` middleware - no longer needed
2016-03-14 21:00:33 +11:00
Mike Thompson
2c2c1c6612
Take out "experimental" comment near `on-changes`. It became official some time ago.
2016-02-26 23:01:54 +11:00
Mike Thompson
3246265483
Added one tick of extra pause when events have `:flush=dom` metadata. Previously, there were odd times when the pause wasn't enough.
2016-02-26 14:24:34 +11:00
Daniel Compton
41cf9951d8
Add tests for undo behaviour
...
Inspired by #149 , this adds tests to cover the change that was made. It
also tests the redo logic.
2016-01-28 23:14:43 +13:00
Sergey Tselovalnikov
bb78981e1d
Fix behavior with large undo lists
2016-01-28 21:31:08 +13:00
Markus Bertheau
4115e410d6
Correct spelling
2016-01-23 18:07:20 +13:00
Markus Bertheau
4822688a62
Correct doc reference to handlers/register-base
2016-01-23 18:07:00 +13:00
Mike Thompson
00f706688a
Make router work with 0.6.0 of reagent (and be backwards compatible)
2015-12-22 00:17:33 +11:00
Mike Thompson
8c01555a6a
Further docs tweaks for v0.6.0
2015-12-09 07:40:47 +11:00
Mike Thompson
2ce82d9fda
Add docs for new `add-post-event-callback`. Promote `on-change` to officially being a part of the API.
2015-12-08 08:19:59 +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
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