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

1.5 and 1.6 router - transitions appear to be eager? #4574

Closed
nathanhammond opened this issue Mar 21, 2014 · 9 comments
Closed

1.5 and 1.6 router - transitions appear to be eager? #4574

nathanhammond opened this issue Mar 21, 2014 · 9 comments

Comments

@nathanhammond
Copy link
Member

This may be an intentional change but I've not seen any documentation to that effect.

Versions: 1.5 (beta) and 1.6 (canary).
Reduction: http://emberjs.jsbin.com/qudek/3/edit

Test Procedure:

  1. Click the link to "slow error"
  2. Note that even though the model hook returns a promise and no loading substate is defined that we still immediately transition to the "slow" route.
  3. This follows the behavior of "eager" transitions described in the docs though it should follow the "lazy" pattern.

This behavior is different from 1.4.0: http://emberjs.jsbin.com/qudek/2/edit

I don't know how much of a breaking change this is, but it's certainly different and needs to be addressed (blessed or patched) before release.

@machty @rjackson

@nathanhammond
Copy link
Member Author

Additional note on "eager": it doesn't appear that the existing controller and view teardown is occurring, but the change to the location bar occurs at a different stage in the process. This might be less of an issue, but it does imply to me that we're now at risk of polluting the history stack.

@rwjblue
Copy link
Member

rwjblue commented Mar 21, 2014

Sounds like you are describing the ember-eager-update-url which is enabled by default in beta and canary.

More details here: #4122.

Please confirm, and if so this issue can be closed...

@nathanhammond
Copy link
Member Author

Can confirm, this is intentional. :) Thanks for pointing out the feature I missed!

@stefanpenner
Copy link
Member

Ya this mimics the behavior we all expect.

@mutewinter
Copy link
Contributor

I just upgraded an Ember 1.3.0 app to 1.5.0 Release and am experiencing this exact behavior. The route returns a promise, but the loading route is never shown. This is a breaking change for the app, as the resulting route appears to not load until the promise resolves.

Here's a JS Bin that demonstrates the loading route not showing: http://emberjs.jsbin.com/quleripu/2/edit

edit: better JS BIn

@mutewinter
Copy link
Contributor

@machty
Copy link
Contributor

machty commented Apr 21, 2014

@mutewinter the loading route name you provided seems incorrect; loading substates are always going to be siblings (or parents) of the route that's actually slowly loading, so you'd need to name it "loading"

This lightly modified JSBin seems to work correctly: http://emberjs.jsbin.com/quleripu/4

@mutewinter
Copy link
Contributor

That's it! This must have been a bug on the canary 1.3.0 release my app was running. 🎩 @machty.

@nathanhammond
Copy link
Member Author

Additional semi-related information that I've tripped on:
#4573

Don't know if that's made it into Ember yet...

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

5 participants