Commit graph

162 commits

Author SHA1 Message Date
Leo Horie
00d555b9f4 prevent race condition between route.set and async resolve
remove path and route from attrs
2016-08-26 00:56:01 -04:00
Leo Horie
ec07d76fcd m.fragment docs
public api tests
2016-08-24 00:26:15 -04:00
Leo Horie
53a83a58f2 rename RouteResolver::view back to render to restore diff semantics
prevent double resolving
2016-08-23 22:33:18 -04:00
Pierre-Yves Gerardy
747f2b2847 Move otherwise redundant unsubscription 2016-08-17 16:22:44 +02:00
Pierre-Yves Gerardy
aca514eba7 Better cleanup when unmounting 2016-08-17 15:20:19 +02:00
Leo Horie
0de67f3ac9 re-add line removed by mistake 2016-08-17 09:14:46 -04:00
Leo Horie
8c9cc0e1f4 lint docs 2016-08-17 09:09:45 -04:00
Leo Horie
80c25e3809 rename routeresolver methods to {onmatch,view}
expose some piecemeal modules
rename internal xhr to request
mirror internal stream api to match public api
2016-08-17 00:10:47 -04:00
Leo Horie
68331065b7 more router tests 2016-08-12 23:56:17 -04:00
Leo Horie
2ee15e3639 fix stream uncaught error reporting
fix stream JSON stringification
rename internal render function to `use`
2016-08-12 00:41:44 -04:00
Pat Cavit
c92e24b7e1 render clears non-mithril dom nodes 2016-08-05 14:15:25 -07:00
Pierre-Yves Gerardy
ccc2e1c85d Unmount and cleanly refresh mount points. 2016-08-05 00:55:18 +02:00
Pierre-Yves Gerardy
37e7b67a49 Add a test for unmounting. 2016-08-04 23:31:53 +02:00
Leo Horie
3a19dddb22 more docs 2016-08-04 00:00:31 -04:00
Leo Horie
a7a546ad7d Merge pull request #1173 from pygy/multi-mount-redraw-test
Test for #1146 and #1153
2016-08-03 13:21:10 -04:00
Leo Horie
8ec3a3f2c5 test router using file protocol as start point 2016-08-02 23:21:13 -04:00
Leo Horie
47070e2f0c compare path, not route 2016-08-02 10:32:26 -04:00
Leo Horie
9bd0cd73fc inline Date.now, remove redundant comment 2016-07-30 14:55:34 -04:00
Pat Cavit
47b9aba680 Use Date.now() if available since it's faster 2016-07-29 23:18:11 -07:00
Leo Horie
7c736b511a rename node to vnode 2016-07-29 22:04:04 -04:00
Pierre-Yves Gerardy
357de85129 Test for #1146 and #1153 2016-07-26 00:53:33 +02:00
Pierre-Yves Gerardy
6e12373e71 Remove questionable test
Its failure breaks CI and having it break may be desirable.
2016-07-24 11:55:16 +02:00
Barney Carroll
8590a2da5b Alt test for multiple mountpoint redraw (fails) 2016-07-18 11:32:30 +01:00
Barney Carroll
e43d638f54 Merge branch 'rewrite' into multi-mount-test 2016-07-18 09:02:49 +01:00
Leo Horie
e4a16d3bf4 Merge remote-tracking branch 'origin/rewrite' into rewrite 2016-07-15 22:24:07 -04:00
Leo Horie
602d048611 build 2016-07-15 22:24:04 -04:00
Pierre-Yves Gerardy
e0a0e97ada Event handlers redraw all mount points. Fix #1146 2016-07-15 12:54:26 +02:00
Leo Horie
084d99f125 fix back button on default route trigger 2016-07-15 01:22:34 -04:00
Barney Carroll
193b08e10c Test for #1146 2016-07-14 14:10:55 +01:00
Leo Horie
a6c56ff6b9 resolve hook in router 2016-07-11 09:50:00 -04:00
Pat Cavit
34bed08cd0 m.route.getPath/setPath -> m.route.get/set (#1133) 2016-07-01 12:46:15 -07:00
Leo Horie
e8e0bae726 make setPath always async 2016-07-01 13:03:07 -04:00
Leo Horie
520d15a060 remove non-deterministic test 2016-07-01 00:01:28 -04:00
Leo Horie
9afefe0fd7 don't swallow redraws 2016-06-30 23:46:47 -04:00
impinball
b4fb21475c Add editorconfig, resolve differences
This includes newlines, tabs, among other things.
2016-06-18 03:22:12 -04:00
Leo Horie
7b268c6ee8 expose setPath and getPath 2016-06-03 08:59:52 -04:00
Leo Horie
e7420e72e1 more tests 2016-05-24 23:16:43 -04:00
Leo Horie
6400b616fc make renderer optional in autoredraw module 2016-05-21 01:14:59 -04:00
Leo Horie
9b602edf4e create only one renderer 2016-05-21 00:59:33 -04:00
Leo Horie
0005cf26ee refactor redraw into pubsub and autoredraw
- pubsub is a basic pubsub impl
- autoredraw is glue code to register callback to pubsub and onevent

moved e.redraw to autoredraw
2016-05-21 00:37:34 -04:00
Leo Horie
4e65357242 node doesn't like floating point numbers as setTimeout arg 2016-05-20 22:55:21 -04:00
Leo Horie
b1e8f61c87 fix tests after merge conflict 2016-05-20 22:50:52 -04:00
Leo Horie
acd9d5b641 Merge branch 'bundler-fix' into rewrite
Conflicts:
	api/mount.js
	api/router.js
	api/tests/test-router.js
	index.js
2016-05-20 22:45:51 -04:00
Leo Horie
e5391a1957 bundler variable disambiguation 2016-05-20 22:38:10 -04:00
Pat Cavit
71c77ba603 Add m.redraw() support for multiple mount points
To better match `0.2.x` behavior: https://jsfiddle.net/xbpyqL9k/
2016-05-20 15:27:17 -07:00
Pat Cavit
04eaa25ab1 Support for skipping redraws (#1049)
Mostly useful for event handlers, setting `e.redraw = false` will prevent mithril from re-rendering.
2016-05-20 11:50:41 -07:00
Pat Cavit
2ca8fa6e66 Quiet some ESLint errors (#1060)
Some via config, a few via code edits
2016-05-19 22:18:31 -07:00
Pat Cavit
79e4c4a104 Remove old testing file (#1061) 2016-05-19 22:16:35 -07:00
Leo Horie
977239d207 rename limiter to throttle and refactor
- don't inject raf/setTimeout since we can't really mock them w/ a good degree of timing accuracy anyways

fix some unrelated tests
2016-05-19 23:24:04 -04:00
Pat Cavit
da6b697d19 spaces -> tabs 2016-05-19 11:57:41 -07:00