-
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
add Server-Driven Routes to path configurations? #71
Comments
This is something we'd love to see included by default! Ideally, this would be built in to the codebase and not require any path configuration to work. So I'm not 100% sure of the implementation path, yet. But if you can get the ball rolling there's a good chance it will help us get it over the finish line. |
Hey @joemasilotti - I would love to get some high-level feedback on the draft PR I opened when you get a chance. |
@jpsphaxer that's cooler than what I was thinking :-) |
Thanks! Another approach I thought about was including those |
@jpsphaxer This is what I had in mind too. The advantage of this approach is that we don't pollute the |
@svara that looks great, very clean! I'm in favor of this approach for the same reason you outlined. I think all the PR needs is a test or two to make sure the rules get added to the right spot and we don't accidentally remove |
@subelsky thanks for getting this started, and @jpsphaxer thank you for the draft PR and implementation suggestions 🙌 Historical location URLs are often redirected to from the server after a form submission in the "modal" context. The desired behaviour for the apps is to always dismiss the “modal” stack first and then handle the action (resume/refresh/recede) on the “default” stack. Here's the behavior for each *_historical_location command: resume_historical_location
refresh_historical_location
recede_historical_location
I'll start working on this next week. |
Hi @svara, But I can see that popping the modal could be more beneficial and has more use-cases. And you mentioned about the recede_historical_location:
That is what Android currently does. iOS only pops the modal. I thought that Android's behavior is the incorrect one, why I opened a issue on the Android repo. But maybe I'm wrong on that. |
I discovered these useful
turbo-rails
route helpers in the Hotwire docs:which I found necessary to get forms and modals working properly with the template. @joemasilotti would you be open to a PR adding the routes? e.g.
The text was updated successfully, but these errors were encountered: