-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUGFIX beta] Make substates great again! #14545
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the various rejects to all reject with a value (preferably with an Error), and add expect counts to the new tests?
I'll try do another pass of review tomorrow or Monday, but this is looking very good. Thank you!
this.register('template:application_error', compile('Error!')); | ||
this.register('route:post', Route.extend({ | ||
model() { | ||
return RSVP.reject(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you reject with an Error and display that errors message in the template??
this.register('template:error', compile('Error!')); | ||
this.register('route:post', Route.extend({ | ||
model() { | ||
return RSVP.reject(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above (reject with an error + show error message in template)
this.register('template:post_error', compile('Error!')); | ||
this.register('route:post', Route.extend({ | ||
model() { | ||
return RSVP.reject(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above (reject with an error + show error message in template)
this.register('template:post.error', compile('Error!')); | ||
this.register('route:post.comments', Route.extend({ | ||
model() { | ||
return RSVP.reject(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above (reject with an error + show error message in template)
0e74704
to
abf1c9d
Compare
@rwjblue addressed your comments and moved the tests to a more logical spot in that file. |
Also added some tests in ember-engines that pass after introducing the changes in this PR: ember-engines/ember-engines#247 |
Awesome, thank you! |
@rwjblue any chance this could get cherry picked into beta? |
Yep, done! (was on mobile when I merged originally) |
Thanks! |
… the app Some of the changes in emberjs/ember.js#14545 are needed to support using the getHandler function in the bread-crumbs.js file.
This PR is a pretty substantial overhaul of the internals for how we handle loading/error substates and routes. This makes it much easier (IMO) to follow what is going on internally.
It also fixes issues with Engines, such as ember-engines/ember-engines#193. To verify, it introduces a slew of new tests and removes some old ones that weren't testing the behavior we actually wanted.