-
Notifications
You must be signed in to change notification settings - Fork 21
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
Include default server route rules by default #76
base: main
Are you sure you want to change the base?
Conversation
I like this approach @svara - thanks for sharing this! |
additionalProperties: PathRule.recedeHistoricalLocation.properties | ||
) | ||
navigator.route(recedeHistoricalLocationProposal) | ||
try await delay() |
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.
The delays are far from ideal, but they are necessary to ensure the view lifecycle methods execute properly and the tests pass. I’ll explore architectural improvements in the future.
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.
I'm surprised these are needed even with the TestableNavigationController
presenting everything without animation. Does pushing, popping, or dismissing require the delay?
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.
Without the delay the recede historical location
test fails. Even though the presentations are not animated, I doubt the view lifecycle methods are all called synchronously. I'll investigate.
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.
Great work on this @svara. Just a couple questions to start.
This PR builds on top of #74 and addresses #71.
Context
Turbo Native allows server-driven routing in Rails applications. Previously, developers had to explicitly define these routing rules in the path config. This PR adds default routing rules for server-driven navigation directly into the framework.
Changes
PathRule
s.NavigationHierarchyController
has been adapted to handle the historical location rules.Historical Location Behaviour
resume_historical_location
refresh_historical_location
recede_historical_location