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

compatibility with route-action #578

Open
Leooo opened this issue Jun 21, 2017 · 4 comments
Open

compatibility with route-action #578

Leooo opened this issue Jun 21, 2017 · 4 comments

Comments

@Leooo
Copy link

Leooo commented Jun 21, 2017

Hello, I dont know if this belongs to this repo or to route-action 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 in route-action to deactivate the actions when we are transitioning, in some wayy??

Thanks,

L

(copy of DockYard/ember-route-action-helper#63)

@ef4
Copy link
Collaborator

ef4 commented Jun 21, 2017

The fundamental problem here is the same as in #347

The route action helper (and Ember's own link-to) make an assumption that isn't really true: that there is such a thing as "the global current route". It's false particularly during animation, but there are other cases too (like wanting to pre-render content for an adjacent route). It causes a large number of headaches because it's necessarily very timing-dependent.

RFC 95 has the solution, which is that "the current route" should not be globally scoped, it should be dynamically scoped. Essentially, every component was necessarily rendered as part of some route and there's no reason it shouldn't be able to know which one. This avoids the problem of trying to do fragile, timing-dependent things with a shared global current route.

@Leooo
Copy link
Author

Leooo commented Jun 25, 2017

@ef4 thanks for explaining, very clear! Feel free to close this issue if you want, or to wait for RFC 95 to move forward.

@Leooo
Copy link
Author

Leooo commented Jun 25, 2017

@ef4 emberjs/rfcs#95 has been merged and corresponds to the RFC above, so is it not allowing us to solve this problem, maybe with some work on liquid-fire?

@ef4
Copy link
Collaborator

ef4 commented Jun 26, 2017

The RFC being merged just means people agree it's the right solution. It doesn't mean the work is done in Ember.

There is good progress being made recently on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants