You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey guys,
Thanks for all your amazing work on Turbo Native! We're running a turbo native app and have hit an issue when using the advance and replace actions.
When a turbo frame has data-turbo-action="advance" set, the navigation is promoted to a page visit and the URL in the browser is updated. However, the Session URL in Turbo Native is not updated.
This is causing an issue for us because we have a dashboard that displays various dates to the user. When the user navigates to a new date, we use a Turbo Frame to just change the relevant content. Because the URL is updated, if the user refreshes the page, they will see the latest date they viewed.
Because Turbo Native isn't updating the URL though, if the user refreshes the page, they go back to the last date that was loaded when they first launched the app.
It seems like there's also a change in v7.1.0 where now when a user navigates between two different tabs in the app, going back to the original tab triggers a new session request. This means if you navigate to a particular date in the dashboard tab, then swap to a different tab then back to the dashboard tab, the page flashes and you end up back on the initial dashboard date as opposed to the one you just navigated to.
The sessionDidStartRequest (and other related delegate methods) are not fired for an advance action either so there's no way to hook into the request and manually update the session URL from within the app.
For an advance and replace action given we're promoting them to full page navigations, it feels like we should be calling those delegate methods and updating the session's URL so we have consistent behaviour between the web and native versions of Turbo.
If this seems like behaviour we would want, I'm happy to try to put together a PR with the update.
The text was updated successfully, but these errors were encountered:
I believe this is related to my issue as well. We put our root tabs UI in a data-turbo-permanent so the app root is immune to cache refreshes. We change tabs via JS and use Turbo.navigator.history.replace to modify the url when tabs change. Turbo Native does not seem to honor this change though. Any progress or workarounds here?
Hey guys,
Thanks for all your amazing work on Turbo Native! We're running a turbo native app and have hit an issue when using the
advance
andreplace
actions.When a turbo frame has
data-turbo-action="advance"
set, the navigation is promoted to a page visit and the URL in the browser is updated. However, the Session URL in Turbo Native is not updated.This is causing an issue for us because we have a dashboard that displays various dates to the user. When the user navigates to a new date, we use a Turbo Frame to just change the relevant content. Because the URL is updated, if the user refreshes the page, they will see the latest date they viewed.
Because Turbo Native isn't updating the URL though, if the user refreshes the page, they go back to the last date that was loaded when they first launched the app.
It seems like there's also a change in v7.1.0 where now when a user navigates between two different tabs in the app, going back to the original tab triggers a new session request. This means if you navigate to a particular date in the dashboard tab, then swap to a different tab then back to the dashboard tab, the page flashes and you end up back on the initial dashboard date as opposed to the one you just navigated to.
The
sessionDidStartRequest
(and other related delegate methods) are not fired for an advance action either so there's no way to hook into the request and manually update the session URL from within the app.For an
advance
andreplace
action given we're promoting them to full page navigations, it feels like we should be calling those delegate methods and updating the session's URL so we have consistent behaviour between the web and native versions of Turbo.If this seems like behaviour we would want, I'm happy to try to put together a PR with the update.
The text was updated successfully, but these errors were encountered: