-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
add refresh method to router service #631
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.
Should this also deprecate Route#refresh()
? And/Or change its implementation to delegate to RouterService
?
@mehulkar That being said, I think it would be good to mention the service method from the route documentation, to make it super easy for folks to see there is a service mechanism to do this also. |
Would we want to be opting for different behavior and refreshing all routes or is the implicit goal here to refresh only the current route (as defined from the perspective of the caller)? The “defined from the perspective of the caller” part seems quite tricky to implement well (and consistently) ... |
In my opinion, no. We should keep it around until we are sure we have filled in all the gaps. There may be a use case for refreshing an only some of the active routes, possibly. |
@rwjblue revised. |
@rwjblue @acorncom I think it would be useful to have a method on the router service for refreshing the current route (including child routes). I had a recent use case for providing a “Try Again” button when a route failed to load due to a timeout. I did look for some method of refreshing the route but ended up resorting to just redirecting to a parent route which so happened to redirect back to the route that I wanted to refresh. |
Co-authored-by: Robert Jackson <[email protected]>
@rwjblue Thanks again for the fast review. |
Apologies for the delayed response. The updates all look good to me, nice work 👍 |
Re-reading this after a while, does my previous question/suggestion apply more, now that {
refresh() {
routerService.refresh(this.fullName)
}
} |
Ya, I think that makes sense, though I'm not sure it really matters from an RFC perspective (since it doesn't really change any existing API surface, it just makes the implementation make more sense). |
This adds the refresh method to the RouterService as described in RFC 631. RFC PR: emberjs/rfcs#631
This adds the refresh method to the RouterService as described in RFC 631. RFC PR: emberjs/rfcs#631
This adds the refresh method to the RouterService as described in RFC 631. RFC PR: emberjs/rfcs#631
This adds the refresh method to the RouterService as described in RFC 631. RFC PR: emberjs/rfcs#631
This adds a `refresh` method to the RouterService as described in RFC 631 RFC PR: emberjs/rfcs#631
…router service This adds the refresh method to the RouterService as described in RFC 631. RFC PR: emberjs/rfcs#631
…router service This adds the refresh method to the RouterService as described in RFC 631. RFC PR: emberjs/rfcs#631
…router service This adds the refresh method to the RouterService as described in RFC 631. RFC PR: emberjs/rfcs#631
This is a great idea! Wondering what's the timeline for implementing this in Ember core? |
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
This is rather inelegant but the [RouterService.refresh] method is not yet available to us. [RouterService.refresh]: emberjs/rfcs#631
@MariannaAtPlay This was implemented in https://github.com/emberjs/ember.js/blob/master/CHANGELOG.md#v410-beta1-november-19-2021 |
Advance RFC #631 `"RouterService#refresh"` to Stage Recommended
Part of issue #629
Rendered