Commit graph

54 commits

Author SHA1 Message Date
Patrik Johnson
131e61002e Enable setting navigation options with m.route.link API 2017-10-29 12:21:23 +02:00
Pierre-Yves Gérardy
8ab31790ab Merge pull request #1592 from pygy/async-redraw
Make m.redraw() purely asynchronous, add m.redraw.sync()
2017-07-17 23:16:44 +02:00
Pierre-Yves Gérardy
a867754d6a Don't overwrite the options object when redirecting from onmatch with m.route.set, fix #1857 2017-07-05 23:58:01 +02:00
Pierre-Yves Gerardy
b004c20f0c Make m.redraw() strictly asynchronous 2017-06-13 15:20:29 +02:00
Pierre-Yves Gerardy
f273b012c9 Add support for (m.mount + m.route) × (factory + constructible) components 2017-02-15 21:58:42 +01:00
Leo
9d5f686bbd #1579 prevent infinite loop in non-existent default route 2017-02-03 22:21:14 -05:00
Pat Cavit
d119accb21 fix: m.route.param, not m.route.params 😓 2017-01-11 15:14:29 -08:00
Pat Cavit
834dd02610 feat: bring back m.route.params()
Because it's annoying only having route params available to the
top-level components within a route.
2017-01-11 14:23:42 -08:00
Leo Horie
e8f36e4e26 don't break back button on bail 2016-12-26 12:18:51 -05:00
Pierre-Yves Gerardy
703aab7905 [router] Fix hopefully the last race condition 2016-12-09 11:13:42 +01:00
Pierre-Yves Gerardy
f8bb81f539 [api/router] simplify the route finalization logic 2016-12-07 23:06:02 +01:00
Leo Horie
f1f52445ec more router fixes 2016-12-07 07:57:58 -05:00
Leo Horie
992aa30ccc fix m.route.link and m.route.set history replacement 2016-12-06 23:29:15 -05:00
Leo Horie
c2acdf6f4a fix and test some edge cases in router 2016-12-06 19:59:39 -05:00
Pierre-Yves Gerardy
650f7c4f3b [router] remove logic made redundant by promise use 2016-12-06 21:44:49 +01:00
Pierre-Yves Gerardy
cf12c00fa1 [router] don't mutate RouteResolvers, move a branch out of redraw 2016-12-06 21:34:24 +01:00
Leo Horie
846d6ce24b router fixes 2016-12-06 10:44:25 -05:00
Leo Horie
3134202d24 fix tests 2016-12-06 00:09:09 -05:00
Pat Cavit
adabc37fd7 Handle resolving with a component 2016-12-05 17:09:02 -08:00
Pat Cavit
22e9c3bb6f Make api/router.js promise-aware 2016-12-05 16:24:24 -08:00
Leo Horie
9f340daa3a reduce router code size 2016-12-05 12:32:11 -05:00
Leo Horie
b11f54b919 avoid null ref if mount redraw runs midway route init 2016-12-05 11:35:50 -05:00
Leo Horie
809d8921c9 bypass route resolution algorithm on non-routed redraws 2016-12-05 11:23:25 -05:00
Pierre-Yves Gerardy
ec9f4baa6c Pass the RouteResolver as context to RouteResolver.render 2016-12-05 01:09:25 +01:00
Pierre-Yves Gerardy
7ee34c122d Call RouteResolver.render on route.set(route.get()) 2016-12-04 23:42:01 +01:00
Leo Horie
2ffd2fb7e4 throttle m.route redraws 2016-12-04 01:53:39 -05:00
Leo Horie
713c25c9c0 fix #1404 2016-12-01 01:45:07 -05:00
Pierre-Yves Gerardy
426f1b55b0 Respect the key set on the vnode of routed components 2016-09-17 22:50:43 +02:00
Pierre-Yves Gerardy
a689bf4ccc Simplify resolution identifier logic (just a bit) 2016-09-08 20:00:45 +02:00
Pierre-Yves Gerardy
a1131eb4f2 Lint the router files 2016-09-03 00:32:12 +02:00
Pierre-Yves Gerardy
a34685d7a4 m.route.get() returns the last fully resolved route (fix #1276), change RouteResolver.onmatch() signature according to #1277 2016-09-02 22:03:27 +02:00
Pierre-Yves Gerardy
09578197a1 Mount-based api/router.js
Fix #1180
Fix #1268
Fix #1275
Fix #1286
2016-09-02 21:59:05 +02:00
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
53a83a58f2 rename RouteResolver::view back to render to restore diff semantics
prevent double resolving
2016-08-23 22:33:18 -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
Leo Horie
47070e2f0c compare path, not route 2016-08-02 10:32:26 -04:00
Leo Horie
7c736b511a rename node to vnode 2016-07-29 22:04:04 -04:00
Leo Horie
602d048611 build 2016-07-15 22:24:04 -04:00
Leo Horie
084d99f125 fix back button on default route trigger 2016-07-15 01:22:34 -04: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
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
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
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