-
Notifications
You must be signed in to change notification settings - Fork 48
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
compatibility with liqud-fire #63
Comments
Hey so by the looks of the commit d6e511e usage of this library is actively being discouraged? If you look at ember observer this library is in the top 10% of ember libraries. So I think this issue is worth addressing considering how popular this library is. I recently wrote a patch for our own internal fork of the library & open to making a pull request for it, but it basically does the following, and I thought I would share if it helps with addressing this. My PatchCreate a service with two properties export default Service.extends({
getRouter () {
return getOwner(this).lookup('router:main');
},
lastStartedTransition: null,
lastFinishedTransition: null,
init (...args) {
this._super(...args);
// ignores tidy up
const router = this.getRouter();
router.on('willTransition', this.willTransition.bind(this));
router.on('didTransition', this.didTransition.bind(this));
},
willTransition (transition) {
this.set('lastStartedTransition', transition);
},
didTransition () {
this.set('lastFinishedTransition', this.get('lastStartedTransition'));
},
isTransitioning: compute('lastStartedTransition', 'lastFinishedTransition', function () {
return this.get('lastFinishedTransition') !== this.get('lastStartedTransition');
}),
}) And in export default Helper.extend({
// ...
compute([actionName, ...params]) {
// ...
runInDebug(() => {
let { handler } = getRouteWithAction(router, actionName);
let isTransitioning = this.get('new-service.isTransitioning');
assert(
`[ember-route-action-helper] Unable to find action ${actionName}`,
handler || isTransitioning,
);
});
// ...
}
}); Assumptions and potential problemsAssertions are no longer effective on during a transition, but any error will only occur after the transition has finished. However this means no assertion will occur on loading routes or error routes. For liquid fire users the |
Hello, I dont know if this belongs to this repo or to liquid-fire repo, but we have recurrent issues where we are transitioning between two routes using liquid-fire, and where for some reason Ember looks for actions in the SECOND route corresponding to the
route-action
calls of the template in the FIRST route. Any Idea of how we could handle such situations? Maybe a hook inroute-action
to deactivate the actions when we are transitioning, in some wayy??Thanks,
L
(copy of ember-animation/liquid-fire#578)
The text was updated successfully, but these errors were encountered: