Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Router #2123

Merged
merged 49 commits into from
May 9, 2017
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
8e84e68
Initial push for React Router conversion
mikemurray Apr 13, 2017
8aa01be
Merge branch 'development' into 2099-react-router
mikemurray Apr 13, 2017
caa6187
Implement more global router functions
mikemurray Apr 17, 2017
85ff25e
Route rendering
mikemurray Apr 19, 2017
bde7fba
Merge branch 'development' into 2099-react-router
mikemurray Apr 19, 2017
3e1d8ca
Move rest of router from client dir, into router package
mikemurray Apr 21, 2017
0e9e41a
Merge branch 'development' into 2099-react-router
mikemurray Apr 21, 2017
5e21deb
Use Router.go for tagLink
mikemurray Apr 24, 2017
eb9779a
Fixes issue with browserRouter router initializing before router core
mikemurray Apr 24, 2017
5827dd5
Merge branch 'development' into 2099-react-router
mikemurray Apr 24, 2017
193129a
Fixed route resolution for to exact matches
mikemurray Apr 25, 2017
38175f5
Merge branch 'development' into 2099-react-router
mikemurray Apr 25, 2017
cd08bfa
Merge branch 'development' into 2099-react-router
mikemurray Apr 26, 2017
9ea31b6
Updated dependencies and shrink-wrap
mikemurray Apr 26, 2017
41038af
Not found and unauthorized routes and redirects
mikemurray Apr 27, 2017
f88ab6e
Rename admin template to coreLayout
mikemurray Apr 27, 2017
5e3a9c3
Fix broken import
mikemurray Apr 27, 2017
7a4d883
Fix redirect url for PayPal pay flow express
mikemurray Apr 27, 2017
310391f
Enable onEnter and legacy enter hooks
mikemurray Apr 27, 2017
59d199f
Added exit hooks and improved hook handling logic
mikemurray Apr 27, 2017
c58b29e
Show package settings shortcuts only if requested
mikemurray Apr 27, 2017
8544402
Added Router.watchPathChange()
mikemurray Apr 27, 2017
b81ee8f
Remove unused function
mikemurray Apr 27, 2017
8a114ff
Added router go for grid item click event
mikemurray Apr 28, 2017
b13672d
Fix eslint issues
mikemurray Apr 28, 2017
e566ff2
Added router go for cart items
mikemurray Apr 28, 2017
1a59005
Fix router context for hooks
mikemurray Apr 28, 2017
fd31bc3
Added special handling for print layout
mikemurray Apr 28, 2017
7496772
Scrolling for content area as admin
mikemurray Apr 28, 2017
52fc7b4
Fix router reload when auth state changes
mikemurray Apr 28, 2017
217a240
Fix lint issues
mikemurray Apr 28, 2017
a3f1668
Fix lint issues
mikemurray Apr 28, 2017
ec5f339
Merge branch 'development' into 2099-react-router
mikemurray May 1, 2017
3f2f894
Fix blank pdf view
mikemurray May 1, 2017
fd9c000
Prevent route change when previous and next routes match.
mikemurray May 1, 2017
c9aae7c
Fixed reference for getShopName()
mikemurray May 1, 2017
da45aa6
Merge branch 'development' into 2099-react-router
mikemurray May 3, 2017
f38c2d0
Fixing broken blaze layout
mikemurray May 3, 2017
32b530b
Removed unused packages
mikemurray May 3, 2017
945c50f
Adjust width of container to alleviate some scrolling issues
mikemurray May 4, 2017
9bbc50f
Merge branch 'development' into 2099-react-router
mikemurray May 4, 2017
ddf25f6
Higher zindex for cart slide out
mikemurray May 4, 2017
bd9f337
Fix getSlug reference
mikemurray May 4, 2017
fe88f2b
Merge branch 'development' into 2099-react-router
May 5, 2017
52f3843
Merge branch 'development' into 2099-react-router
brent-hoover May 8, 2017
5c52619
Merge branch 'development' into 2099-react-router
May 9, 2017
fbfe6dc
Fixes issue with incorrectly displaying unauthorized template
mikemurray May 9, 2017
db3ebd4
Merge branch 'development' into 2099-react-router
mikemurray May 9, 2017
41f7b7b
Merge branch 'development' into 2099-react-router
May 9, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ jeremy:stripe
jparker:gravatar
juliancwirko:s-alert
juliancwirko:s-alert-stackslide
kadira:blaze-layout
kadira:dochead
kadira:flow-router-ssr
matb33:collection-hooks
meteorhacks:ssr
meteorhacks:subs-manager
Expand Down
6 changes: 0 additions & 6 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ [email protected]
juliancwirko:[email protected]
juliancwirko:[email protected]
juliancwirko:[email protected]
kadira:[email protected]
kadira:[email protected]
kadira:[email protected]
[email protected]
[email protected]
[email protected]
Expand All @@ -106,10 +104,6 @@ mdg:[email protected]
mdg:[email protected]
[email protected]
[email protected]
meteorhacks:[email protected]
meteorhacks:[email protected]
meteorhacks:[email protected]
meteorhacks:[email protected]
meteorhacks:[email protected]
meteorhacks:[email protected]
[email protected]
Expand Down
6 changes: 0 additions & 6 deletions client/modules/router/helpers.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { BlazeLayout } from "meteor/kadira:blaze-layout";
import Router from "./main";

//
// Layout container uses body
//
BlazeLayout.setRoot("body");

//
// pathFor
// template helper to return path
Expand Down
56 changes: 1 addition & 55 deletions client/modules/router/hooks.js
Original file line number Diff line number Diff line change
@@ -1,55 +1 @@

/**
* Route Hook Methods
*/
const Hooks = {
_hooks: {
onEnter: {},
onExit: {}
},

_addHook(type, routeName, callback) {
if (typeof this._hooks[type][routeName] === "undefined") {
this._hooks[type][routeName] = [];
}
this._hooks[type][routeName].push(callback);
},

onEnter(routeName, callback) {
// global onEnter callback
if (arguments.length === 1 && typeof arguments[0] === "function") {
const cb = routeName;
return this._addHook("onEnter", "GLOBAL", cb);
}
// route-specific onEnter callback
return this._addHook("onEnter", routeName, callback);
},

onExit(routeName, callback) {
// global onExit callback
if (arguments.length === 1 && typeof arguments[0] === "function") {
const cb = routeName;
return this._addHook("onExit", "GLOBAL", cb);
}
// route-specific onExit callback
return this._addHook("onExit", routeName, callback);
},

get(type, name) {
const group = this._hooks[type] || {};
const callbacks = group[name];
return (typeof callbacks !== "undefined" && !!callbacks.length) ? callbacks : [];
},

run(type, name, constant) {
const callbacks = this.get(type, name);
if (typeof callbacks !== "undefined" && !!callbacks.length) {
return callbacks.forEach((callback) => {
return callback(constant);
});
}
return null;
}
};

export default Hooks;
export default from "/imports/plugins/core/router/lib/hooks";
2 changes: 1 addition & 1 deletion client/modules/router/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default as Router } from "./main";
export { default as Router } from "/imports/plugins/core/router/lib/router";
Loading