-
Notifications
You must be signed in to change notification settings - Fork 115
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
Fix Ember 3.6 deprecation #305
Conversation
Thanks for taking the time to work on this! from
I think what is needed here is to just extend the RouterService, not change out the hook. |
But the Why did you do an |
I'm not sure about your first comment whether it is better to do it by extending the RouterService, if you think it is, go ahead, it's definitely fine by me. :) About the second part - I prefer not overriding |
ya the
made me think that adding functionality to the Router directly is discouraged. |
need to reset the travis config. |
@boris-petrov had to close and reopen this to get the new travis config pulled. This is working now in the new version, but breaking in the old. I think we should move the functionality into a standalone method that gets passed the routes, and the "owner" then either run a check on version that will do the appropriate hook, or see if there is some kind of polly fill for |
Ah, yes, I did not think of that. I see here that there is no such polyfill as of now. I've never written an addon so I'm not sure what's the normal way to handle these things. There is always the option to drop support for Ember < 3 and bump the major version of the plugin. Otherwise I'm not sure how to proceed. P.S. Is it possible to check the version of Ember at runtime? If so, then yes, we could just have two implementations. |
I know you can check the ember version.. But if there was a way to check for the hook, that would be better.. I’ll do some digging and get back to you. |
What about making this opt-in? We don't even use this in our app (e.g. we only use component styles), and you need some manual setup for this anyhow (adding So I would propose to remove the re-export in |
@mydea That’s not a bad idea..!! Hmm.. Ok. I’ll work on that next week unless someone else gets to it first. |
Use the `routeDidChange` event instead of the `didTransition` hook
I came here to do the same fix, glad to see someone is working on it already! Keep up the good work! |
fix with #308 . thanks so much @boris-petrov !! 🙏🙇♂️ |
Use the
routeDidChange
event instead of thedidTransition
hook