-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Router(js) refactor (wip) #16838
Router(js) refactor (wip) #16838
Conversation
Did something that is crashing the tests now.. hum. |
Maybe the CPs aren't update since they aren't volatile. Tried |
I'm thinking it has something to do with stubbing/mocking in the tests..
|
I've fixed the failing tests. I can't make a pull request against your fork. Don't know why, but you can cherry-pick the two commits from here: jelhan@0973652 jelhan@d91bc2a |
@jelhan 🎆 |
@@ -197,9 +197,10 @@ const RouterService = Service.extend({ | |||
*/ | |||
isActive(...args) { | |||
let { routeName, models, queryParams } = extractRouteArgs(args); | |||
let router = this._router; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could do let { _isActiveIntent, state } = this._router;
and use those instead.
How is this related to that? Is there still help needed? |
Yes related. Feel free to submit against my fork. Next step would be to create/use public APIs from router.js |
how do you feel about moving to ts? |
Moving what to TS? This refactor or router.js? |
Just giving you a heads up I started adventuring on this journey so that we can implement the rest of emberjs/rfcs#95. Also related: Also branch when we realized we needed to push more things down into router.js |
It would be amazing if someone could use the type declarations from router.js and convert |
@chadhietala can you explain that last bulleted link and it's context? https://github.com/emberjs/ember.js/commits/route-info |
Remove one use of routerjs outside of the rotuer
cad8329
to
7087b3e
Compare
@chadhietala I've rebased against the changes in master, waiting on travis. |
What is you recommendation around using recognizer? Should that be imported explicitly or should the used methods be wrapped in ember router. For example: Also, |
Sorry was on holiday. So |
@chadhietala any thoughts on route-recognizer? Should that be encapsulated by router.js or should ember use it directly? |
hey @knownasilya, is this work still valid? |
I don't think so. Other people tackled refactors at the same time that it would take a while to unwind. |
Putting this here for visibility, this is still a WIP, please don't merge.
Notes from slack: