[CLEANUP beta] Remove deprecate-router-events support code#19749
[CLEANUP beta] Remove deprecate-router-events support code#19749rwjblue merged 3 commits intoemberjs:masterfrom
deprecate-router-events support code#19749Conversation
|
note ref - #19709 Either one is fine by me! |
|
It looks like #19709 removed the deprecation warnings but still triggers those events if app has the route event. But it also appears I missed removing used test code part, I picked those to this PR. |
|
@rwjblue I checked the router service RFC and I think actions on |
| 'You attempted to override the "didTransition" method which has been deprecated. Please inject the router service and listen to the "routeDidChange" event.', | ||
| router.didTransition === defaultDidTransition | ||
| ); | ||
| router.didTransition(infos); |
There was a problem hiding this comment.
I'm wondering if we can take this a step further and make defaultDidTransition && defaultWillTransition the defacto method that is called when didTransition/willTransition is called on the PrivateRouter. I'm wondering if we can take everything in, say defaultDidTransition and just throw it in here and then get rid of the assert.
There was a problem hiding this comment.
@snewcomer @nlfurniss sorry for the late reply.
The problem of putting everything from defaultDidTransition to here is that there won't be assertion thrown when people who used to override the didTransition. Before this PR there are warnings.
My thought is that we should internally migrate from router_js's didTransition to routeDidChange then major bump router_js to remove didTransition/willTransition. Meanwhile keep the defaultDidTransition.
6b634cf to
a076e85
Compare
|
Rebased to resolve a conflict |
deprecate-router-events support code
Deprecation https://deprecations.emberjs.com/v3.x/#toc_deprecate-router-events
This PR removes
willTransitionanddidTransitionhooks on EmberRouterwillTransitionanddidTransitionevents onRouteBased on https://github.com/emberjs/rfcs/blob/af64915b5ecde010fce09309a47ee6d2447588d0/text/0095-router-service.md#transition-object I think
willTransitionanddidTransitiononRouteare not deprecated.They are triggered from https://github.com/tildeio/router.js/blob/4f5d411e9ba44efea003bc3159484b4060ebfc2a/lib/router/router.ts#L811